diff --git a/include/boost/integer_traits.hpp b/include/boost/integer_traits.hpp index d216bb1..441a72b 100644 --- a/include/boost/integer_traits.hpp +++ b/include/boost/integer_traits.hpp @@ -23,7 +23,7 @@ // These are an implementation detail and not part of the interface #include -#ifndef BOOST_NO_INTRINSIC_WCHAR_T +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && !defined(BOOST_NO_CWCHAR) #include #endif @@ -85,7 +85,9 @@ class integer_traits template<> class integer_traits : public std::numeric_limits, -#if defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) +#if defined(WCHAR_MIN) && defined(WCHAR_MAX) + public detail::integer_traits_base +#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: public detail::integer_traits_base #elif defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400) @@ -96,7 +98,7 @@ class integer_traits // (also, std::numeric_limits appears to return the wrong values) public detail::integer_traits_base #else - public detail::integer_traits_base +#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. #endif { }; #endif // BOOST_NO_INTRINSIC_WCHAR_T