$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2007-08-13 17:31:58
on Mon Aug 13 2007, "Gross, Steve" <SGross-AT-sjm.com> wrote:
> Is there a way to use the mpl to determine if an object can be converted
> to some parent / child class? That is, if A derives from B, can I say
> something like "mpl::is_convertible_to<A, B>::value" ?
See Boost.TypeTraits
boost::is_base_and_Derived<B,A>::value
or more simply,
boost::is_convertible<A*,B*>::value
MPL metafunctions are of course interoperable with the type traits.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com