From bc58964228c52b208ed6308eebf0c19735d1537a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 28 Dec 2015 18:53:44 +0000 Subject: [PATCH] Disable wchar_t usage when it's not available. See https://svn.boost.org/trac/boost/ticket/11870. --- include/boost/type_traits/detail/common_arithmetic_type.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/type_traits/detail/common_arithmetic_type.hpp b/include/boost/type_traits/detail/common_arithmetic_type.hpp index 7211002..8c09158 100644 --- a/include/boost/type_traits/detail/common_arithmetic_type.hpp +++ b/include/boost/type_traits/detail/common_arithmetic_type.hpp @@ -35,12 +35,16 @@ template<> struct arithmetic_type<2> typedef char (&result_type) [2]; }; +#ifndef BOOST_NO_INTRINSIC_WCHAR_T + template<> struct arithmetic_type<3> { typedef wchar_t type; typedef char (&result_type) [3]; }; +#endif + // There are five standard signed integer types: // “signed char”, “short int”, “int”, “long int”, and “long long int”. @@ -170,7 +174,9 @@ private: static arithmetic_type<1>::result_type select( arithmetic_type<1>::type ); static arithmetic_type<2>::result_type select( arithmetic_type<2>::type ); +#ifndef BOOST_NO_INTRINSIC_WCHAR_T static arithmetic_type<3>::result_type select( arithmetic_type<3>::type ); +#endif static arithmetic_type<4>::result_type select( arithmetic_type<4>::type ); static arithmetic_type<5>::result_type select( arithmetic_type<5>::type ); static arithmetic_type<6>::result_type select( arithmetic_type<6>::type );