|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2004-04-26 16:20:40
Never mind,
I see it now. Sorry I was desperate.
Robert Ramey
Robert Ramey wrote:
>
> #include <boost/static_assert.hpp>
> #include <boost/type_traits/is_base_and_derived.hpp>
> #include <boost/type_traits/remove_pointer.hpp>
>
> class Base1
> {
> char a;
> };
>
> class Base2
> {
> int b;
> };
>
> class Derived : public Base1, public Base2
> {
> long c;
> };
>
> void main(){
> // this passes
> BOOST_STATIC_ASSERT((boost::is_base_and_derived<
> Base1,
> Derived
> >::value));
>
> // this fails !?
> BOOST_STATIC_ASSERT((boost::is_base_and_derived<
> boost::remove_pointer<Base1 *>,
> boost::remove_pointer<Derived *>
> >::value));
> }
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk