mpl question: object hierarchies

13 Aug
2007
13 Aug
'07
8:11 p.m.
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::value" ? Thanks, --Steve

13 Aug
13 Aug
9:31 p.m.
on Mon Aug 13 2007, "Gross, Steve"
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::value" ?
See Boost.TypeTraits boost::is_base_and_Derived::value or more simply, boost::is_convertible::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
6404
Age (days ago)
6404
Last active (days ago)
1 comments
2 participants
participants (2)
-
David Abrahams
-
Gross, Steve