
----- Original Message ----- From: "Lorenzo Caminiti" <lorcaminiti@gmail.com> To: <boost@lists.boost.org> Sent: Saturday, May 08, 2010 10:38 PM Subject: [boost] [type_traits] is_base_of<> GCC error for v1.42.0 Hello all, The following code gives the GCC compiler error below for Boost 1.42.0 while it compiles just fine for Boost 1.34.1. Is this a bug in Boost.TypeTraits for 1.42.0? // File: b00.cpp #include <boost/type_traits.hpp> #include <iostream> struct y {}; struct x: y { static const bool v = boost::is_base_of<y, x>::value; }; _______________________________________________ Hi, As John stated this is the expected behavior. If you need it, you can define the constant once the classes are completly declared. struct y {}; struct x: y { static const bool v; }; const bool x::v = boost::is_base_of<y, x>::value; HTH, Vicente