id summary reporter owner description type status milestone component version severity resolution keywords cc 8407 Unclear docs for is_base_of driscoll@… John Maddock "It isn't clear (at least to me) from [http://www.boost.org/doc/libs/1_53_0/libs/type_traits/doc/html/boost_typetraits/reference/is_base_of.html the documentation for is_base_of] whether it evaluates to `true_type` when `Base` is an //direct// base class of `Derived` or //any// inheritance ancestor. It would be nice if this were clarified. (I understand the first para of chapter 10 of the C++03 standard to define the term ""base class"" as including both direct and indirect base classes, but IMO this is surprising; myself and two nearby people I informally polled equate ""base class"" with ""direct base class"". At the suggestion of a fourth, we looked it up in the standard for the purposes of this report.) I had to try the following program to figure out what the behavior is (which seems to be ""`true` if `Base` is any ancestor of `Derived`""): {{{ #include #include struct Base {}; struct Intermediate : Base {}; struct Derived : Intermediate {}; template const char * answer(Base a, Derived b) { return boost::is_base_of::value ? ""yes"" : ""no""; } int main() { Base b; Intermediate i; Derived d; std::cout << ""Checks:\n"" << "" Base is a base class of base [expect yes]: "" << answer(b, b) << ""\n"" << "" Inter. is a base class of base [expect yes]: "" << answer(b, i) << ""\n"" << "" Derived is a base class of inter. [expect yes]: "" << answer(i, d) << ""\n"" << "" Base is a base class of derived [expect no]: "" << answer(d, b) << ""\n"" << ""Actual answer:\n"" << "" Derived is a base class of base: "" << answer(b, d) << ""\n""; } }}}" Bugs closed To Be Determined type_traits Boost 1.53.0 Problem fixed