Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2003-01-28 13:47:52


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:001b01c2c6f4$71f7a490$1d00a8c0_at_pdimov2...
> From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> > 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?"

The answer is in mc++d and also in Daniel Frey's post:

<<
I like that
"base" and "derived" reflect the parameters order, but I always mix up
"super" and "sub" :-/
>>

> 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>?

Well, clearly void is no base. Even if we also define is_super_and_subtype,
void is hardly a supertype of everything.

Andrei


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