diff --git a/include/boost/counting_iterator.hpp b/include/boost/counting_iterator.hpp index 1580756..f4795fd 100644 --- a/include/boost/counting_iterator.hpp +++ b/include/boost/counting_iterator.hpp @@ -28,6 +28,8 @@ // Incrementable. // // Revision History +// 08 Feb 2001 Beginning of a failed attempt to appease Borland +// (David Abrahams) // 07 Feb 2001 rename counting_iterator() -> make_counting_iterator() // (David Abrahams) // 04 Feb 2001 Added counting_iterator_generator; updated comments @@ -136,16 +138,19 @@ namespace detail { template struct counting_iterator_traits { private: - typedef typename detail::counting_iterator_traits_select<( + enum { + is_numeric = #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS std::numeric_limits::is_specialized #else - // Causes warnings with GCC, but how else can I detect numeric types at - // compile-time? - (boost::is_convertible::value && - boost::is_convertible::value) + // Try to detect numeric types at compile time + boost::is_convertible::value + && boost::is_convertible::value #endif - )>::template traits traits; + }; + + typedef typename detail::counting_iterator_traits_select< + is_numeric>::template traits traits; public: typedef Incrementable value_type; typedef const Incrementable& reference;