|
Boost : |
Subject: Re: [boost] is_virtual_base_of ?
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-03-11 16:00:52
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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk