#include #include #include struct marker{}; template struct is_marked { BOOST_STATIC_CONSTANT(bool,value=(boost::is_base_and_derived::value)); }; struct foo { int x; }; struct bar:private marker { }; typedef is_marked type1; typedef is_marked > type2; typedef is_marked type3; int main() { bool b1=type1::value; bool b2=type2::value; bool b3=type3::value; return 0; }