From: David Abrahams (dave_at_[hidden])
Date: 2003-10-27 15:06:05
Brian McNamara <lorgon_at_[hidden]> writes:
> 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
>> 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
No, that's my point.
> This is the order suggested by the name (IMO, anyway).
Yes, many people seem to think so.
> Second, what it the aforementioned "currying issue"?
> Presumably MPL has
> some magical way to make
> turn into the corresponding metafunctions that test if "T is a subtype
> of B" or "T is a supertype of D", respectively, yes?
Well, yes it does. It's just what you quoted above about visual
Looks like a way of testing whether something is a base of D. How
would you name a metafunction which tests if something is a base of
some fixed class Foo? Probably "is_base_of_Foo", right?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk