diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index a3157f7..23b9727 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -15,6 +15,7 @@ #include #include #include +#include // should be the last #include #include @@ -128,6 +129,13 @@ struct bd_helper template struct is_base_and_derived_impl2 { + // + // May silently do the wrong thing with incomplete types + // unless we trap them here: + // + BOOST_STATIC_ASSERT(sizeof(B)); + BOOST_STATIC_ASSERT(sizeof(D)); + struct Host { #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)