From acb746274f0a6e1085ce26b1391a281f97f6dc44 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sun, 1 Apr 2012 19:08:46 +0000 Subject: [PATCH] Fixes #6670 (now using BOOST_NO_UNICODE_LITERALS macro) [SVN r77691] --- include/boost/lexical_cast.hpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/include/boost/lexical_cast.hpp b/include/boost/lexical_cast.hpp index d79e50a..438ee9c 100644 --- a/include/boost/lexical_cast.hpp +++ b/include/boost/lexical_cast.hpp @@ -480,7 +480,7 @@ namespace boost }; #endif -#ifndef BOOST_NO_CHAR16_T +#if !defined(BOOST_NO_CHAR16_T) && !defined(BOOST_NO_UNICODE_LITERALS) template<> struct lcast_char_constants { @@ -493,7 +493,7 @@ namespace boost }; #endif -#ifndef BOOST_NO_CHAR32_T +#if !defined(BOOST_NO_CHAR32_T) && !defined(BOOST_NO_UNICODE_LITERALS) template<> struct lcast_char_constants { @@ -1957,6 +1957,17 @@ namespace boost target_char_t, src_char_type >::type char_type; +#if !defined(BOOST_NO_CHAR16_T) && defined(BOOST_NO_UNICODE_LITERALS) + BOOST_STATIC_ASSERT_MSG(( !::boost::is_same::value + && !::boost::is_same::value), + "Your compiler does not have full support for char16_t" ); +#endif +#if !defined(BOOST_NO_CHAR32_T) && defined(BOOST_NO_UNICODE_LITERALS) + BOOST_STATIC_ASSERT_MSG(( !::boost::is_same::value + && !::boost::is_same::value), + "Your compiler does not have full support for char32_t" ); +#endif + typedef detail::lcast_src_length lcast_src_length; std::size_t const src_len = lcast_src_length::value; char_type buf[src_len + 1]; @@ -1982,7 +1993,7 @@ namespace boost ::boost::is_same::value >::value >::value, - is_same::value + ::boost::is_same::value >::value); const bool requires_stringbuf =