Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-28 12:41:09


From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:u3cndjmu6.fsf_at_boost-consulting.com...
> > > 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.
>
> At the cost of adding an extra name, maybe it would be nice to provide
> is_base_and_derived and is_super_and_subclass.

I've always felt that is_base_and_derived is a funny name. is_base_of<B, D>
and is_derived_from<D, B> both look pronounceable(sp?) to me: "is B a base
of D? is D derived from B?"

While we're at it, is the final verdict that is_base_and_derived<void, X>
should be false? What about is_base_and_derived<void, void>?


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