diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index 19b0a7f..a830737 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -46,7 +46,7 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false) #endif -#ifdef __GNUC__ +#if defined(__GNUC__) && (__GNUC__ < 3) // special case for gcc where illegally cv-qualified reference types can be // generated in some corner cases: BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T const,!(::boost::is_reference::value)) @@ -120,3 +120,4 @@ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const volatile,true) #include "boost/type_traits/detail/bool_trait_undef.hpp" #endif // BOOST_TT_IS_CONST_HPP_INCLUDED +