From: "Rani Sharoni" <[EMAIL PROTECTED]> > > I fogot to show little usability sample: > > struct B {}; > struct B1 : B {}; > struct B2 : B {}; > struct D : B1, private B2 {}; > > typedef char Test[is_base_and_derived<B, D>::result]; // improvement 1 - > multiple base > typedef char Test[is_base_and_derived<B1,D>::result]; > typedef char Test[is_base_and_derived<B2,D>::result]; // improvement 2 - > private base > typedef char Test[!is_base_and_derived<int,D>::result];
Very clever. But I'm not sure whether this is what is_base_and_derived is supposed to check. It seems that many are using it as is_accessible_base_of_derived, is-a, or is_convertible<D*, B*>. Perhaps we need two separate metafunctions for that. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost