Boost logo

Boost :

From: Brian McNamara (lorgon_at_[hidden])
Date: 2003-10-27 14:31:57


On Mon, Oct 27, 2003 at 09:11:33AM -1000, David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
> > I've repeatedly suggested is_base_of<B, D> ("B is a base of D") and
> > is_derived_from<D, B> ("D is derived from B") and repeatedly been
> > ignored. ;-)
>
> If I ignored you it's probably because this ignores the currying
> issue.
>
> is_base_of<D,B>
>
> makes plenty of sense. When the "D" gets bound visually to
> is_base_of, we have a predicate on "B" which asks "is it a base of D"?

All of a sudden I'm totally lost.

First, do you mean

   is_base_of<B,D>

instead? This is the order suggested by the name (IMO, anyway).

Second, what it the aforementioned "currying issue"? Presumably MPL has
some magical way to make

   is_base_of<B,_>
and
   is_base_of<_,D>

turn into the corresponding metafunctions that test if "T is a subtype
of B" or "T is a supertype of D", respectively, yes?

-- 
-Brian McNamara (lorgon_at_[hidden])

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