Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-28 10:49:53


"John Maddock" <jm_at_[hidden]> writes:

>> >"Thomas Witt" <witt_at_[hidden]> wrote in message
>> >news:3E3590ED.8030100_at_ive.uni-hannover.de...
>> >> IIUC is_based_and_derived<T,T> evaluates to true as well. Is a class T
>> >> strictly speaking a base class of itself?
>> >
>> >Yes
>>
>> That's a convention of is_base_and_derived though. To the standard a
>> class is not a base of itself, so this convention should be
>> documented. In other words, you have to specify whether the ordering
>> is strict or not.
>
> Yes, a class is it's own superclass/subclass, but IMO not it's own
> base: so it is a bug in the implementation.

I'd like to suggest changing the documentation to match the
implementation at this point. I know of a few places where I have
relied on the current semantics, and I'm sure that's the case for
others as well. I'm not set on this course, but I think it's worth
considering.

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk