diff --git a/include/boost/counting_iterator.hpp b/include/boost/counting_iterator.hpp index 3a8762e..7e67049 100644 --- a/include/boost/counting_iterator.hpp +++ b/include/boost/counting_iterator.hpp @@ -47,6 +47,7 @@ # include # include # include +# include # ifndef BOOST_NO_LIMITS # include # endif @@ -123,11 +124,13 @@ namespace detail { // limitations of the compiler and library. template struct is_numeric { + // For a while, this wasn't true, but we rely on it below. This is a regression assert. + BOOST_STATIC_ASSERT(::boost::is_integral::value); enum { value = #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS std::numeric_limits::is_specialized #elif defined(__BORLANDC__) - ::boost::is_integral::value || ::boost::is_same::value + ::boost::is_integral::value #else boost::is_convertible::value && boost::is_convertible::value #endif