From 67cadfe2b36f8ad64638b909809f347065d2fb21 Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Tue, 27 Apr 2010 23:14:23 +0000 Subject: [PATCH 01/27] applies BOOST_DEDUCED_TYPENAME to hopefully please VACPP [SVN r61634] --- include/boost/functional/forward_adapter.hpp | 4 ++-- include/boost/functional/lightweight_forward_adapter.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/functional/forward_adapter.hpp b/include/boost/functional/forward_adapter.hpp index c6e61a9..796abd2 100644 --- a/include/boost/functional/forward_adapter.hpp +++ b/include/boost/functional/forward_adapter.hpp @@ -141,7 +141,7 @@ namespace boost { template< class Self > struct forward_adapter_result::apply< Self() > - : boost::result_of< typename c::t() > + : boost::result_of< BOOST_DEDUCED_TYPENAME c::t() > { }; template< class MD, class F, class FC > @@ -316,7 +316,7 @@ namespace boost template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) > struct forward_adapter_result::apply< Self(BOOST_PP_ENUM_PARAMS(N,T)) > : boost::result_of< - typename c::t(BOOST_PP_ENUM_BINARY_PARAMS(N, + BOOST_DEDUCED_TYPENAME c::t(BOOST_PP_ENUM_BINARY_PARAMS(N, typename q::t& BOOST_PP_INTERCEPT)) > { }; diff --git a/include/boost/functional/lightweight_forward_adapter.hpp b/include/boost/functional/lightweight_forward_adapter.hpp index d21ac42..637aa9e 100644 --- a/include/boost/functional/lightweight_forward_adapter.hpp +++ b/include/boost/functional/lightweight_forward_adapter.hpp @@ -146,7 +146,7 @@ namespace boost { template< class Self > struct lightweight_forward_adapter_result::apply< Self() > - : boost::result_of< typename c::t() > + : boost::result_of< BOOST_DEDUCED_TYPENAME c::t() > { }; template< class MD, class F, class FC > @@ -205,7 +205,7 @@ namespace boost struct lightweight_forward_adapter_result::apply< Self (BOOST_PP_ENUM_PARAMS(N,T)) > : boost::result_of< - typename c::t (BOOST_PP_ENUM_BINARY_PARAMS(N, + BOOST_DEDUCED_TYPENAME c::t (BOOST_PP_ENUM_BINARY_PARAMS(N, typename x::t BOOST_PP_INTERCEPT)) > { }; From 67c3951e3f233f08a389b3a89584317397a3338e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 6 Jul 2010 23:32:37 +0000 Subject: [PATCH 02/27] Try preventing static casts when calling `hash_value`. [SVN r63716] --- hash/test/Jamfile.v2 | 2 ++ hash/test/implicit_fail_test.cpp | 16 ++++++++++++++++ hash/test/shared_ptr_fail_test.cpp | 11 +++++++++++ include/boost/functional/hash/hash.hpp | 9 +++++++++ 4 files changed, 38 insertions(+) create mode 100644 hash/test/implicit_fail_test.cpp create mode 100644 hash/test/shared_ptr_fail_test.cpp diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 4435dd2..c2d8084 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -50,6 +50,8 @@ test-suite functional/hash [ run container_no_fwd_test.cpp ] [ compile-fail hash_no_ext_fail_test.cpp ] [ compile-fail namespace_fail_test.cpp ] + [ compile-fail implicit_fail_test.cpp ] + [ compile-fail shared_ptr_fail_test.cpp ] [ run hash_no_ext_macro_1.cpp ] [ run hash_no_ext_macro_2.cpp ] ; diff --git a/hash/test/implicit_fail_test.cpp b/hash/test/implicit_fail_test.cpp new file mode 100644 index 0000000..1dd0555 --- /dev/null +++ b/hash/test/implicit_fail_test.cpp @@ -0,0 +1,16 @@ +#include + +namespace test +{ + struct base {}; + std::size_t hash_value(base const&) { return 0; } + + struct converts { operator base() const { return base(); } }; +} + +int main() { + boost::hash hash; + test::converts x; + + hash(x); +} \ No newline at end of file diff --git a/hash/test/shared_ptr_fail_test.cpp b/hash/test/shared_ptr_fail_test.cpp new file mode 100644 index 0000000..584739f --- /dev/null +++ b/hash/test/shared_ptr_fail_test.cpp @@ -0,0 +1,11 @@ +#include +#include + +// This should obviously pass if shared_ptr ever supports Boost.Hash. + +int main() { + boost::hash > hash; + boost::shared_ptr x(new int(10)); + + hash(x); +} \ No newline at end of file diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index e85ca5a..bd8d37f 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include @@ -29,6 +30,14 @@ namespace boost { + // If you get a static assertion here, it's because hash_value + // isn't declared for your type. + template + std::size_t hash_value(T const&) { + BOOST_STATIC_ASSERT((T*) 0 && false); + return 0; + } + std::size_t hash_value(bool); std::size_t hash_value(char); std::size_t hash_value(unsigned char); From 510c0894b0317c13c5e7b4d9ae931f660a20055a Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 8 Jul 2010 20:48:30 +0000 Subject: [PATCH 03/27] Fix inspect issues. [SVN r63762] --- hash/test/implicit_fail_test.cpp | 7 ++++++- hash/test/shared_ptr_fail_test.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hash/test/implicit_fail_test.cpp b/hash/test/implicit_fail_test.cpp index 1dd0555..e48bbcd 100644 --- a/hash/test/implicit_fail_test.cpp +++ b/hash/test/implicit_fail_test.cpp @@ -1,3 +1,8 @@ + +// Copyright 2010 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #include namespace test @@ -13,4 +18,4 @@ int main() { test::converts x; hash(x); -} \ No newline at end of file +} diff --git a/hash/test/shared_ptr_fail_test.cpp b/hash/test/shared_ptr_fail_test.cpp index 584739f..b0e045f 100644 --- a/hash/test/shared_ptr_fail_test.cpp +++ b/hash/test/shared_ptr_fail_test.cpp @@ -1,3 +1,8 @@ + +// Copyright 2010 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + #include #include @@ -8,4 +13,4 @@ int main() { boost::shared_ptr x(new int(10)); hash(x); -} \ No newline at end of file +} From 892623b4010880921688ff70df2650d13da4f255 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 10 Jul 2010 13:47:47 +0000 Subject: [PATCH 04/27] Release notes for hash. [SVN r63810] --- hash/doc/changes.qbk | 8 ++++++++ include/boost/functional/hash/hash.hpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/hash/doc/changes.qbk b/hash/doc/changes.qbk index 4e0d0a9..bc6f4ca 100644 --- a/hash/doc/changes.qbk +++ b/hash/doc/changes.qbk @@ -106,4 +106,12 @@ Avoid hashing 0.5 and 0 to the same number. * Stop using deprecated `BOOST_HAS_*` macros. +[h2 Boost 1.44.0] + +* Prevent implicit conversions when calling `hash_value`. If you find + that the new version breaks your code, you can enable the old + behaviour by defining `BOOST_HASH_ALLOW_IMPLICIT_CASTS` - although + I would recommend that you update your code to work with the new + version. + [endsect] diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index bd8d37f..54407d6 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -30,6 +30,8 @@ namespace boost { +#if !defined(BOOST_HASH_ALLOW_IMPLICIT_CASTS) + // If you get a static assertion here, it's because hash_value // isn't declared for your type. template @@ -38,6 +40,8 @@ namespace boost return 0; } +#endif + std::size_t hash_value(bool); std::size_t hash_value(char); std::size_t hash_value(unsigned char); From 3bb0cd29e45bc8f11e26842e5118e3ff75a273f0 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 14 Jul 2010 08:17:48 +0000 Subject: [PATCH 05/27] Actually, make the change to hash opt-in, rather than opt-out. It's a bit late to introduce a breaking change. [SVN r64007] --- hash/doc/changes.qbk | 15 ++++++++++----- hash/test/Jamfile.v2 | 1 + include/boost/functional/hash/hash.hpp | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/hash/doc/changes.qbk b/hash/doc/changes.qbk index bc6f4ca..eec4876 100644 --- a/hash/doc/changes.qbk +++ b/hash/doc/changes.qbk @@ -108,10 +108,15 @@ [h2 Boost 1.44.0] -* Prevent implicit conversions when calling `hash_value`. If you find - that the new version breaks your code, you can enable the old - behaviour by defining `BOOST_HASH_ALLOW_IMPLICIT_CASTS` - although - I would recommend that you update your code to work with the new - version. +* Add option to prevent implicit conversions when calling `hash_value` by + defining `BOOST_HASH_NO_IMPLICIT_CASTS`. When using `boost::hash` + for a type that does not have `hash_value` declared but does have + an implicit conversion to a type that does, it would use that + implicit conversion to hash it. Which can sometimes go very wrong, + e.g. using a conversion to bool and only hashing to 2 possible + values. Since fixing this is a breaking change and was only + approached quite late in the release cycle with little discussion + it's opt-in for now. This, or something like it, will become the + default in a future version. [endsect] diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index c2d8084..1b35eed 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -7,6 +7,7 @@ import testing ; project hash-tests : requirements + BOOST_HASH_NO_IMPLICIT_CASTS all intel:on intel:-strict-ansi diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 54407d6..24a78f3 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -30,7 +30,7 @@ namespace boost { -#if !defined(BOOST_HASH_ALLOW_IMPLICIT_CASTS) +#if defined(BOOST_HASH_NO_IMPLICIT_CASTS) // If you get a static assertion here, it's because hash_value // isn't declared for your type. From ef1bfd017435837754f5f8b7aa9f62387bfc130f Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 14 Jul 2010 08:28:04 +0000 Subject: [PATCH 06/27] Only include static_assert when necessary. [SVN r64009] --- include/boost/functional/hash/hash.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 24a78f3..108d3ed 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -15,7 +15,10 @@ #include #include #include + +#if defined(BOOST_HASH_NO_IMPLICIT_CASTS) #include +#endif #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include From 0ae94ec276d8d9e77c9af98ba6a5fd3e9bd7cc9e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 27 Jul 2010 19:18:53 +0000 Subject: [PATCH 07/27] Fix hashing pointers on 64-bit OpenVMS. Patch by Artyom. Refs #4477 [SVN r64397] --- include/boost/functional/hash/hash.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 108d3ed..0eedf7f 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -209,9 +209,15 @@ namespace boost template std::size_t hash_value(T* v) #endif { +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 + // for some reason ptrdiff_t on OpenVMS compiler with + // 64 bit is not 64 bit !!! + std::size_t x = static_cast( + reinterpret_cast(v)); +#else std::size_t x = static_cast( reinterpret_cast(v)); - +#endif return x + (x >> 3); } From 6f3fee97d433bbbfadea57f542c9accf483dd8ca Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 14 Nov 2010 11:42:58 +0000 Subject: [PATCH 08/27] Remove some 'always_show_run_output' flags. [SVN r66566] --- hash/test/Jamfile.v2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 1b35eed..de35142 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -25,8 +25,8 @@ test-suite functional/hash [ run hash_number_test.cpp ] [ run hash_pointer_test.cpp ] [ run hash_function_pointer_test.cpp ] - [ run hash_float_test.cpp : : : always_show_run_output ] - [ run hash_long_double_test.cpp : : : always_show_run_output ] + [ run hash_float_test.cpp ] + [ run hash_long_double_test.cpp ] [ run hash_string_test.cpp ] [ run hash_range_test.cpp ] [ run hash_custom_test.cpp ] From 6435dbe2434263480a615ec2c96d157aa4470810 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 7 Dec 2010 20:45:08 +0000 Subject: [PATCH 09/27] Import boostbook/quickbook in unordered and hash docs. [SVN r67091] --- hash/doc/Jamfile.v2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hash/doc/Jamfile.v2 b/hash/doc/Jamfile.v2 index c21c881..62e2798 100644 --- a/hash/doc/Jamfile.v2 +++ b/hash/doc/Jamfile.v2 @@ -3,6 +3,9 @@ # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +using boostbook ; +using quickbook ; + xml hash : hash.qbk ; boostbook standalone : hash : boost.root=../../../../.. From e2d25b5c003abbb57b186a2d4c2aad9cfb50e0fe Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 11 Dec 2010 14:43:00 +0000 Subject: [PATCH 10/27] Avoid `-Wconversion` warnings in unordered & hash. [SVN r67170] --- hash/doc/changes.qbk | 4 ++++ hash/test/Jamfile.v2 | 4 ++-- hash/test/hash_complex_test.cpp | 2 +- hash/test/hash_number_test.cpp | 3 ++- include/boost/functional/hash/detail/hash_float_generic.hpp | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hash/doc/changes.qbk b/hash/doc/changes.qbk index eec4876..eb6572f 100644 --- a/hash/doc/changes.qbk +++ b/hash/doc/changes.qbk @@ -119,4 +119,8 @@ it's opt-in for now. This, or something like it, will become the default in a future version. +[h2 Boost 1.46.0] + +* Avoid warning due with gcc's `-Wconversion` flag. + [endsect] diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index de35142..8985875 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -11,8 +11,8 @@ project hash-tests all intel:on intel:-strict-ansi - gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter" - darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter" + gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion" + darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion" msvc:on #gcc:on #darwin:on diff --git a/hash/test/hash_complex_test.cpp b/hash/test/hash_complex_test.cpp index a2a2dc2..67e2aff 100644 --- a/hash/test/hash_complex_test.cpp +++ b/hash/test/hash_complex_test.cpp @@ -69,7 +69,7 @@ void complex_float_tests(Float*) generic_complex_tests(complex(0.5,0)); generic_complex_tests(complex(25,0)); generic_complex_tests(complex(25,0)); - generic_complex_tests(complex(-67.5324535,56.23578678)); + generic_complex_tests(complex(static_cast(-67.5324535),static_cast(56.23578678))); } template diff --git a/hash/test/hash_number_test.cpp b/hash/test/hash_number_test.cpp index 91b9b92..1080860 100644 --- a/hash/test/hash_number_test.cpp +++ b/hash/test/hash_number_test.cpp @@ -113,7 +113,8 @@ void poor_quality_tests(T*) if(T(1) != T(2)) BOOST_TEST(x1(T(1)) != x2(T(2))); if((limits::max)() != (limits::max)() - 1) - BOOST_TEST(x1((limits::max)()) != x2((limits::max)() - 1)); + BOOST_TEST(x1(static_cast((limits::max)())) + != x2(static_cast((limits::max)() - 1))); } void bool_test() diff --git a/include/boost/functional/hash/detail/hash_float_generic.hpp b/include/boost/functional/hash/detail/hash_float_generic.hpp index fdbf53f..1278c2f 100644 --- a/include/boost/functional/hash/detail/hash_float_generic.hpp +++ b/include/boost/functional/hash/detail/hash_float_generic.hpp @@ -53,7 +53,7 @@ namespace boost v = ldexp(v, limits::digits); std::size_t seed = static_cast(v); - v -= seed; + v -= static_cast(seed); // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; std::size_t const length @@ -66,7 +66,7 @@ namespace boost { v = ldexp(v, limits::digits); std::size_t part = static_cast(v); - v -= part; + v -= static_cast(part); hash_float_combine(seed, part); } From 948aee8aab2c7a7405c2864ee08fff4664e19918 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 3 Jan 2011 12:43:34 +0000 Subject: [PATCH 11/27] Fix tabs and files without copyright. [SVN r67612] --- hash/test/hash_number_test.cpp | 2 +- include/boost/functional/hash/hash.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hash/test/hash_number_test.cpp b/hash/test/hash_number_test.cpp index 1080860..b989d22 100644 --- a/hash/test/hash_number_test.cpp +++ b/hash/test/hash_number_test.cpp @@ -114,7 +114,7 @@ void poor_quality_tests(T*) BOOST_TEST(x1(T(1)) != x2(T(2))); if((limits::max)() != (limits::max)() - 1) BOOST_TEST(x1(static_cast((limits::max)())) - != x2(static_cast((limits::max)() - 1))); + != x2(static_cast((limits::max)() - 1))); } void bool_test() diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 0eedf7f..389804c 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -210,8 +210,8 @@ namespace boost #endif { #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 - // for some reason ptrdiff_t on OpenVMS compiler with - // 64 bit is not 64 bit !!! + // for some reason ptrdiff_t on OpenVMS compiler with + // 64 bit is not 64 bit !!! std::size_t x = static_cast( reinterpret_cast(v)); #else From 938948a1a908979e4185100eef38417ba54517b6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 4 Jan 2011 23:30:22 +0000 Subject: [PATCH 12/27] Move tests for container_fwd.hpp into detail. [SVN r67667] --- hash/test/Jamfile.v2 | 6 -- hash/test/container_fwd_test.cpp | 114 ---------------------------- hash/test/container_no_fwd_test.cpp | 14 ---- 3 files changed, 134 deletions(-) delete mode 100644 hash/test/container_fwd_test.cpp delete mode 100644 hash/test/container_no_fwd_test.cpp diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 8985875..f7fe7d9 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -43,12 +43,6 @@ test-suite functional/hash [ run link_test.cpp link_test_2.cpp ] [ run link_ext_test.cpp link_no_ext_test.cpp ] [ run extensions_hpp_test.cpp ] - [ run container_fwd_test.cpp ] - [ run container_fwd_test.cpp : : - : gcc:_GLIBCXX_DEBUG - darwin:_GLIBCXX_DEBUG - : container_fwd_gcc_debug ] - [ run container_no_fwd_test.cpp ] [ compile-fail hash_no_ext_fail_test.cpp ] [ compile-fail namespace_fail_test.cpp ] [ compile-fail implicit_fail_test.cpp ] diff --git a/hash/test/container_fwd_test.cpp b/hash/test/container_fwd_test.cpp deleted file mode 100644 index ec8cc54..0000000 --- a/hash/test/container_fwd_test.cpp +++ /dev/null @@ -1,114 +0,0 @@ - -// Copyright 2005-2009 Daniel James. -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include "./config.hpp" - -#include - -#if BOOST_WORKAROUND(__GNUC__, < 3) && \ - !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -template -static void test( - std::basic_string, Allocator> const&) -{ -} -#else -template -static void test( - std::basic_string, Allocator> const&) -{ -} -#endif - -template -static void test(std::deque const&) -{ -} - -template -static void test(std::list const&) -{ -} - -template -static void test(std::vector const&) -{ -} - -template -static void test(std::map const&) -{ -} - -template -static void test(std::multimap const&) -{ -} - -template -static void test(std::set const&) -{ -} - -template -static void test(std::multiset const&) -{ -} - -template -static void test(std::bitset const&) -{ -} - -template -static void test(std::complex const&) -{ -} - -template -static void test(std::pair const&) -{ -} - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int main() -{ - std::deque x1; - std::list x2; - std::vector x3; - std::vector x4; - std::map x5; - std::multimap x6; - std::set x7; - std::multiset > x8; - std::bitset<10> x9; - std::string x10; - std::complex x11; - std::pair, char***> x12; - - test(x1); - test(x2); - test(x3); - test(x4); - test(x5); - test(x6); - test(x7); - test(x8); - test(x9); - test(x10); - test(x11); - test(x12); - - return 0; -} diff --git a/hash/test/container_no_fwd_test.cpp b/hash/test/container_no_fwd_test.cpp deleted file mode 100644 index 9da09da..0000000 --- a/hash/test/container_no_fwd_test.cpp +++ /dev/null @@ -1,14 +0,0 @@ - -// Copyright 2010 Daniel James. -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define BOOST_DETAIL_NO_CONTAINER_FWD - -#include - -int main() -{ - std::set x; - std::vector y; -} From 30618f1dff9d4546030cb132daf731e45b304878 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 14 Jan 2011 03:13:39 +0000 Subject: [PATCH 13/27] Support typeindex in hash. Refs #4756. [SVN r68145] --- hash/doc/ref.xml | 34 ++++++++++++++++++ hash/test/Jamfile.v2 | 1 + hash/test/hash_type_index_test.cpp | 48 ++++++++++++++++++++++++++ include/boost/functional/hash/hash.hpp | 20 +++++++++++ 4 files changed, 103 insertions(+) create mode 100644 hash/test/hash_type_index_test.cpp diff --git a/hash/doc/ref.xml b/hash/doc/ref.xml index 47a09d5..318bf85 100644 --- a/hash/doc/ref.xml +++ b/hash/doc/ref.xml @@ -406,6 +406,29 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + + std::type_index + + + std::size_t + + std::type_index + + + val.hash_code() + + Doesn't throw + + + + Only available if it's in your standard library and Boost.Config + is aware of it. + + + +