
11 Mar
2009
11 Mar
'09
8 p.m.
Daniel Frey:
On 11.03.2009, at 19:47, Francois Barel wrote:
Please see attached test (against trunk r51712). Either I'm missing something very obvious... or is_virtual_base_of reports a completely unrelated struct Z as being a virtual base of struct B, where it is clearly not.
That's probably because the classes are empty, is_virtual_base_of might not be able to work in such a situation. One might check for is_empty and static_assert on it as a protection, but that is not a solution...
It should be possible to check is_base_of first, then check whether the B base of D resides at the same address as the B virtual base of X?