On Wednesday 29 January 2003 09:42 am, Daniel Frey wrote:
> // given some is_base_and_derived< B, D >::value
>
> template< typename T > struct is
> {
>    template< typename U > struct derived_from
>    { enum { value = is_base_and_derived< U, T >::value };
>    template< typename U > struct base_of
>    { enum { value = is_base_and_derived< T, U >::value };
> };
>
> // usage:
>
> is< D >::derived_from< B >::value
> is< B >::base_of< D >::value
>
> Thoughts?
>
> Regards, Daniel

It gets ugly in the common case (where D is a template parameter):
  is<D>::template derived_from<B>::value 

        Doug
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to