From b152bda4a972b5890abb519e99ff651f2c1ffa50 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 10 Feb 2006 16:20:46 +0000 Subject: [PATCH] Patches for VC7.1 not detecting arrays as being const. [SVN r32810] --- include/boost/type_traits/is_const.hpp | 10 +++++++++- include/boost/type_traits/is_volatile.hpp | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index 138bd5b..18b13f0 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -22,12 +22,16 @@ #define BOOST_TT_IS_CONST_HPP_INCLUDED #include +#include #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # ifdef __GNUC__ # include # endif +# if BOOST_WORKAROUND(BOOST_MSVC, < 1400) +# include +# endif #else # include # include @@ -43,7 +47,11 @@ namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //* is a type T declared const - is_const -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp::is_const) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) + BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp::type*>::is_const) +#else + BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp::is_const) +#endif BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false) #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) diff --git a/include/boost/type_traits/is_volatile.hpp b/include/boost/type_traits/is_volatile.hpp index 4df8b7f..db473b5 100644 --- a/include/boost/type_traits/is_volatile.hpp +++ b/include/boost/type_traits/is_volatile.hpp @@ -22,9 +22,13 @@ #define BOOST_TT_IS_VOLATILE_HPP_INCLUDED #include +#include #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include +# if BOOST_WORKAROUND(BOOST_MSVC, < 1400) +# include +# endif #else # include # include @@ -40,7 +44,11 @@ namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //* is a type T declared volatile - is_volatile -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp::is_volatile) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) + BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp::type*>::is_volatile) +#else + BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp::is_volatile) +#endif BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false) #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)