From f230731aa53ba8b30b77e56f28bfcf5317b12dc6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 18 Nov 2016 14:53:12 +0000 Subject: [PATCH] Only support std::wstring when wchar_t is available This hopefuly fixes #8552. https://svn.boost.org/trac/boost/ticket/8552 --- hash/test/hash_string_test.cpp | 4 ++-- include/boost/functional/hash/hash.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hash/test/hash_string_test.cpp b/hash/test/hash_string_test.cpp index 5f72d4e..3c83007 100644 --- a/hash/test/hash_string_test.cpp +++ b/hash/test/hash_string_test.cpp @@ -55,7 +55,7 @@ void string0_tests() BOOST_TEST(hasher(x3) != hasher(x4)); } -#if !defined(BOOST_NO_STD_WSTRING) +#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) void wstring_tests() { compile_time_tests((std::wstring*) 0); @@ -84,7 +84,7 @@ int main() { string_tests(); string0_tests(); -#if !defined(BOOST_NO_STD_WSTRING) +#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) wstring_tests(); #endif return boost::report_errors(); diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index a6c8181..76c4897 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -468,7 +468,7 @@ namespace boost BOOST_HASH_SPECIALIZE(long double) BOOST_HASH_SPECIALIZE_REF(std::string) -#if !defined(BOOST_NO_STD_WSTRING) +#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) BOOST_HASH_SPECIALIZE_REF(std::wstring) #endif