Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-26 08:36:32


This will work on most compilers, but it has other problems (aside from
"::template ..."): there's no way to specialize is<T>... to support new type
relationships, since all of its nested classes must be declared within the
unspecialized template.

----- Original Message -----
From: "Daniel Frey" <daniel.frey_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, November 26, 2001 7:20 AM
Subject: Re: [boost] Re: A couple of issues in submitting typelists to boost

Peter Dimov wrote:
>
> From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> > Yes, but is_public_base suffers of the "who's first and who's second"
> > problem. Per public demand, I changed super_subclass to base_derived. So
> > base_derived<T, U>::value is true is T is the base and U is the derived.
>
> is_a<D, B>::value ?

I like Vesa's approach:

   is< D >::derived_from< B >::value
   is< B >::base_of< D >::value

Is it possible to make this work on most compilers?

Regards, Daniel

--
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de
Info: http://www.boost.org  Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

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