From 1706cb5937137ac0c63bfb4f6cad6bf206e38e70 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 3 Feb 2017 08:41:31 +0000 Subject: [PATCH 1/3] Add ticket link to changelog entry --- hash/doc/changes.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/doc/changes.qbk b/hash/doc/changes.qbk index 8918e0e..c458257 100644 --- a/hash/doc/changes.qbk +++ b/hash/doc/changes.qbk @@ -189,6 +189,6 @@ [h2 Boost 1.64.0] * Fix for recent versions of Visual C++ which have removed `std::unary_function` - and `std::binary_function`. + and `std::binary_function` ([ticket 12353]). [endsect] From 33eb0c50dcc87e4cfea3a088a45126f28f079ad9 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 31 May 2017 10:17:34 +0100 Subject: [PATCH 2/3] Initial support for char32_t --- hash/test/hash_number_test.cpp | 6 ++++++ include/boost/functional/hash/hash.hpp | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/hash/test/hash_number_test.cpp b/hash/test/hash_number_test.cpp index ebfe4d4..18756c3 100644 --- a/hash/test/hash_number_test.cpp +++ b/hash/test/hash_number_test.cpp @@ -164,6 +164,12 @@ int main() NUMERIC_TEST(unsigned char, uchar) #ifndef BOOST_NO_INTRINSIC_WCHAR_T NUMERIC_TEST(wchar_t, wchar) +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T + NUMERIC_TEST(char16_t, char16) +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T + NUMERIC_TEST(char32_t, char32) #endif NUMERIC_TEST(short, short) NUMERIC_TEST(unsigned short, ushort) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 76c4897..0d25cc6 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -107,6 +107,16 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + // long_numbers is defined like this to allow for separate // specialization for long_long and int128_type, in case // they conflict. From 767673645e14aac6020ad45cc88cc4716c242851 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 31 May 2017 22:19:54 +0100 Subject: [PATCH 3/3] Support for char16_t, char32_t, u16string, u32string --- hash/doc/changes.qbk | 4 ++ hash/doc/ref.xml | 85 +++++++++++++++++++++++++- hash/test/hash_string_test.cpp | 56 +++++++++++++++++ include/boost/functional/hash/hash.hpp | 12 ++++ 4 files changed, 156 insertions(+), 1 deletion(-) diff --git a/hash/doc/changes.qbk b/hash/doc/changes.qbk index c458257..5ee6cb6 100644 --- a/hash/doc/changes.qbk +++ b/hash/doc/changes.qbk @@ -191,4 +191,8 @@ * Fix for recent versions of Visual C++ which have removed `std::unary_function` and `std::binary_function` ([ticket 12353]). +[h2 Boost 1.65.0] + +* Support for `char16_t`, `char32_t`, `u16string`, `u32string` + [endsect] diff --git a/hash/doc/ref.xml b/hash/doc/ref.xml index 5fcd43b..f5fd185 100644 --- a/hash/doc/ref.xml +++ b/hash/doc/ref.xml @@ -162,6 +162,42 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + + char16_t + + + std::size_t + + char16_t + + + Unspecified in TR1, except that equal arguments yield the same result. + hash_value(val) in Boost. + + Doesn't throw + + + + + + + char32_t + + + std::size_t + + char32_t + + + Unspecified in TR1, except that equal arguments yield the same result. + hash_value(val) in Boost. + + Doesn't throw + + + @@ -396,6 +432,42 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + + std::u16string + + + std::size_t + + std::u16string const& + + + Unspecified in TR1, except that equal arguments yield the same result. + hash_value(val) in Boost. + + Doesn't throw + + + + + + + std::u32string + + + std::size_t + + std::u32string const& + + + Unspecified in TR1, except that equal arguments yield the same result. + hash_value(val) in Boost. + + Doesn't throw + + +