diff --git a/hash/doc/Jamfile.v2 b/hash/doc/Jamfile.v2 index 9b7bdb7..7f55cd5 100644 --- a/hash/doc/Jamfile.v2 +++ b/hash/doc/Jamfile.v2 @@ -1,6 +1,6 @@ -# Copyright 2005 Daniel James. -# Distributed under the Boost Software License, Version 1.0. (See accompanying +# Copyright Daniel James 2005. Use, modification, and distribution are +# subject to 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 quickbook ; diff --git a/hash/doc/changes.qbk b/hash/doc/changes.qbk index 4a15288..c8f8046 100644 --- a/hash/doc/changes.qbk +++ b/hash/doc/changes.qbk @@ -1,5 +1,5 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] diff --git a/hash/doc/disable.qbk b/hash/doc/disable.qbk index 3d69431..62b4d31 100644 --- a/hash/doc/disable.qbk +++ b/hash/doc/disable.qbk @@ -1,5 +1,5 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] diff --git a/hash/doc/hash.qbk b/hash/doc/hash.qbk index d858f71..3bab67a 100644 --- a/hash/doc/hash.qbk +++ b/hash/doc/hash.qbk @@ -1,7 +1,7 @@ [library Boost.Functional/Hash [quickbook 1.3] [authors [James, Daniel]] - [copyright 2005 2007 Daniel James] + [copyright 2005 2006 Daniel James] [purpose A TR1 hash function object that can be extended to hash user defined types] [category higher-order] @@ -10,7 +10,7 @@ [license 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]) + [@http://www.boost.org/LICENSE_1_0.txt] ] ] diff --git a/hash/doc/intro.qbk b/hash/doc/intro.qbk index b6dac9e..a4f3be3 100644 --- a/hash/doc/intro.qbk +++ b/hash/doc/intro.qbk @@ -1,5 +1,5 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] diff --git a/hash/doc/links.qbk b/hash/doc/links.qbk index 7214c3e..4217f5f 100644 --- a/hash/doc/links.qbk +++ b/hash/doc/links.qbk @@ -1,5 +1,5 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] diff --git a/hash/doc/portability.qbk b/hash/doc/portability.qbk index 66f909a..6c20799 100644 --- a/hash/doc/portability.qbk +++ b/hash/doc/portability.qbk @@ -1,5 +1,5 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] diff --git a/hash/doc/ref.xml b/hash/doc/ref.xml index 4925687..4c98870 100644 --- a/hash/doc/ref.xml +++ b/hash/doc/ref.xml @@ -1,6 +1,5 @@ - @@ -261,42 +260,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - - - long long - - - std::size_t - - long long - - - Unspecified in TR1, except that equal arguments yield the same result. - hash_value(val) in Boost. - - Doesn't throw - - - - - - - unsigned long long - - - std::size_t - - unsigned long long - - - Unspecified in TR1, except that equal arguments yield the same result. - hash_value(val) in Boost. - - Doesn't throw - - - @@ -406,8 +369,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - @@ -502,10 +463,6 @@ for(; first != last; ++first) - - - - @@ -515,36 +472,6 @@ for(; first != last; ++first) Implementation of the hash function. - - std::size_t - bool - - - - std::size_t - char - - - - std::size_t - signed char - - - - std::size_t - unsigned char - - - - std::size_t - short - - - - std::size_t - unsigned short - - std::size_t int @@ -565,16 +492,6 @@ for(; first != last; ++first) unsigned long - - std::size_t - long long - - - - std::size_t - unsigned long long - - std::size_t float @@ -703,14 +620,6 @@ for(; first != last; ++first) std::multimap<K, T, C, A> const& - - - std::size_t - std::complex<T> const& - - Generally shouldn't be called directly by users, instead they should use boost::hash, boost::hash_range @@ -744,10 +653,6 @@ for(; first != last; ++first) int, unsigned int, long, unsigned long val - - long long, unsigned long long - val when abs(val) <= std::numeric_limits<std::size_t>::max(). - float, double, long double An unspecified value, except that equal arguments shall yield the same result. @@ -783,19 +688,11 @@ for(; first != last; ++first) hash_combine(seed, val.second); return seed; - - - std::complex<val[N]> - - For built in types when val.imag() == 0, hash_value(val.real()) - - - diff --git a/hash/doc/thanks.qbk b/hash/doc/thanks.qbk index 27bffc1..1b67c71 100644 --- a/hash/doc/thanks.qbk +++ b/hash/doc/thanks.qbk @@ -1,19 +1,20 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] [section:acknowledgements Acknowledgements] -This library is based on the design by Peter Dimov. During the initial -development -Joaquín M López Muñoz made many useful suggestions and contributed fixes. +This library is based on the design by Peter Dimov's original design. + +During the initial development Joaquín M López Muñoz made many useful +suggestions, contributed fixes. The formal review was managed by Thorsten Ottosen, and the library reviewed by: David Abrahams, Alberto Barbati, Topher Cooper, Caleb Epstein, Dave Harris, -Chris Jefferson, Bronek Kozicki, John Maddock, Tobias Swinger, Jaap Suter, -Rob Stewart and Pavel Vozenilek. Since then, further constructive criticism has -been made by Daniel Krügler, Alexander Nasonov and 沈慧峰. +Chris Jefferson, Bronek Kozicki, John Maddock, Tobias Swinger, Jaap Suter, Rob +Stewart and Pavel Vozenilek. Since then, there have been further contributions +from Daniel Krügler, Alexander Nasonov, 沈慧峰 and John Maddock. The implementation of the hash function for pointers is based on suggestions made by Alberto Barbati and Dave Harris. Dave Harris also suggested an diff --git a/hash/doc/tutorial.qbk b/hash/doc/tutorial.qbk index e30a181..cf17c7a 100644 --- a/hash/doc/tutorial.qbk +++ b/hash/doc/tutorial.qbk @@ -1,5 +1,5 @@ -[/ Copyright 2005-2007 Daniel James. +[/ Copyright 2005-2006 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) ] @@ -119,7 +119,7 @@ When writing a hash function, first look at how the equality function works. Objects that are equal must generate the same hash value. When objects are not equal they should generate different hash values. In this object equality was based just on the id so the hash function -only hashes the id. If it was based on the object's name and author +only hash the id. If it was based on the objects name and author then the hash function should take them into account (how to do this is discussed in the next section). ] diff --git a/hash/examples/books.cpp b/hash/examples/books.cpp index 466ff44..4c31ff1 100644 --- a/hash/examples/books.cpp +++ b/hash/examples/books.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 "./books.hpp" #include diff --git a/hash/examples/books.hpp b/hash/examples/books.hpp index 4acdd86..774dab2 100644 --- a/hash/examples/books.hpp +++ b/hash/examples/books.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // This example illustrates how to use boost::hash with a custom hash function. // The implementation is contained in books.cpp diff --git a/hash/examples/point.cpp b/hash/examples/point.cpp index 6943342..4beb93d 100644 --- a/hash/examples/point.cpp +++ b/hash/examples/point.cpp @@ -1,7 +1,7 @@ -// Copyright 2005 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) +// Copyright Daniel James 2005. Use, modification, and distribution are +// subject to 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 diff --git a/hash/examples/portable.cpp b/hash/examples/portable.cpp index 962dca2..ddb9220 100644 --- a/hash/examples/portable.cpp +++ b/hash/examples/portable.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 diff --git a/hash/index.html b/hash/index.html index 12b5757..b76ca08 100644 --- a/hash/index.html +++ b/hash/index.html @@ -1,6 +1,6 @@ diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 2131e7b..45caa60 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -1,15 +1,13 @@ -# Copyright 2005-2007 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) +# Copyright Daniel James 2005-2006. Use, modification, and distribution are +# subject to 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) import testing ; project hash-tests : requirements gcc:_GLIBCXX_DEBUG - "gcc:-Wsign-promo -Wextra" - msvc:/W4 ; test-suite functional/hash @@ -32,7 +30,6 @@ test-suite functional/hash [ run hash_deque_test.cpp ] [ run hash_set_test.cpp ] [ run hash_map_test.cpp ] - [ run hash_complex_test.cpp ] [ run link_test.cpp link_test_2.cpp ] [ run link_ext_test.cpp link_no_ext_test.cpp ] [ run container_fwd_test.cpp ] diff --git a/hash/test/compile_time.hpp b/hash/test/compile_time.hpp index 99589d1..25ba441 100644 --- a/hash/test/compile_time.hpp +++ b/hash/test/compile_time.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 @@ -12,5 +12,5 @@ void compile_time_tests(T*) { BOOST_STATIC_ASSERT((boost::is_base_and_derived< std::unary_function, HASH_NAMESPACE::hash >::value)); -} +}; diff --git a/hash/test/config.hpp b/hash/test/config.hpp index 12d9aca..1f3739f 100644 --- a/hash/test/config.hpp +++ b/hash/test/config.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) #if defined(TEST_STD) # define TEST_STD_INCLUDES diff --git a/hash/test/container_fwd_test.cpp b/hash/test/container_fwd_test.cpp index 232c357..684e16b 100644 --- a/hash/test/container_fwd_test.cpp +++ b/hash/test/container_fwd_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 diff --git a/hash/test/hash_built_in_array_test.cpp b/hash/test/hash_built_in_array_test.cpp index 5904615..f7789d1 100644 --- a/hash/test/hash_built_in_array_test.cpp +++ b/hash/test/hash_built_in_array_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_custom_test.cpp b/hash/test/hash_custom_test.cpp index 8df3e83..1af95f8 100644 --- a/hash/test/hash_custom_test.cpp +++ b/hash/test/hash_custom_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 diff --git a/hash/test/hash_deque_test.cpp b/hash/test/hash_deque_test.cpp index 7238319..9994a92 100644 --- a/hash/test/hash_deque_test.cpp +++ b/hash/test/hash_deque_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_float_test.cpp b/hash/test/hash_float_test.cpp index c87934d..0bfacbb 100644 --- a/hash/test/hash_float_test.cpp +++ b/hash/test/hash_float_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" @@ -18,23 +18,18 @@ #include -#if defined(BOOST_MSVC) -#pragma warning(push) -#pragma warning(disable:4127) // conditional expression is constant -#endif - template void float_tests(char const* name, T* = 0) { std::cerr<<"\n" <<"Testing " BOOST_STRINGIZE(HASH_NAMESPACE) "::hash<"<\n" <<"\n" - <<"boost::hash_detail::limits::digits = " - <::digits<<"\n" - <<"boost::hash_detail::limits::digits = " - <::digits<<"\n" - <<"boost::hash_detail::limits::digits = " - <::digits<<"\n" + <<"std::numeric_limits::digits = " + <::digits<<"\n" + <<"std::numeric_limits::digits = " + <::digits<<"\n" + <<"std::numeric_limits::digits = " + <::digits<<"\n" <<"\n" ; @@ -55,11 +50,11 @@ void float_tests(char const* name, T* = 0) #if defined(__BORLANDC__) std::cerr<<"Not running infinity checks on Borland, as it causes it to crash.\n"; #else - if(boost::hash_detail::limits::has_infinity) { + if(std::numeric_limits::has_infinity) { T infinity = -log(zero); T infinity2 = (T) 1. / zero; T infinity3 = (T) -1. / minus_zero; - T infinity4 = boost::hash_detail::limits::infinity(); + T infinity4 = std::numeric_limits::infinity(); T minus_infinity = log(zero); T minus_infinity2 = (T) -1. / zero; @@ -71,7 +66,7 @@ void float_tests(char const* name, T* = 0) if(infinity == infinity2) BOOST_TEST(x1(infinity) == x1(infinity2)); - if(infinity == infinity3) + if(infinity == infinity3); BOOST_TEST(x1(infinity) == x1(infinity3)); if(infinity == infinity4) BOOST_TEST(x1(infinity) == x1(infinity4)); @@ -89,26 +84,26 @@ void float_tests(char const* name, T* = 0) // This should really be 'has_denorm == denorm_present' but some // compilers don't have 'denorm_present'. See also a later use. - if(boost::hash_detail::limits::has_denorm) { - if(x1(boost::hash_detail::limits::denorm_min()) == x1(infinity)) { + if(std::numeric_limits::has_denorm) { + if(x1(std::numeric_limits::denorm_min()) == x1(infinity)) { std::cerr<<"x1(denorm_min) == x1(infinity) == "<::denorm_min()) == x1(minus_infinity)) { + if(x1(std::numeric_limits::denorm_min()) == x1(minus_infinity)) { std::cerr<<"x1(denorm_min) == x1(-infinity) == "<::has_quiet_NaN) { - if(x1(boost::hash_detail::limits::quiet_NaN()) == x1(infinity)) { + if(std::numeric_limits::has_quiet_NaN) { + if(x1(std::numeric_limits::quiet_NaN()) == x1(infinity)) { std::cerr<<"x1(quiet_NaN) == x1(infinity) == "<::quiet_NaN()) == x1(minus_infinity)) { + if(x1(std::numeric_limits::quiet_NaN()) == x1(minus_infinity)) { std::cerr<<"x1(quiet_NaN) == x1(-infinity) == "<::max)(); + T max = (std::numeric_limits::max)(); T half_max = max / 2; T quarter_max = max / 4; T three_quarter_max = max - quarter_max; @@ -142,50 +137,50 @@ void float_tests(char const* name, T* = 0) BOOST_TEST(x1(v2) == HASH_NAMESPACE::hash_value(v2)); #endif - BOOST_TEST(x1(boost::hash_detail::limits::epsilon()) == - HASH_NAMESPACE::hash_value(boost::hash_detail::limits::epsilon())); + BOOST_TEST(x1(std::numeric_limits::epsilon()) == + HASH_NAMESPACE::hash_value(std::numeric_limits::epsilon())); - BOOST_TEST(boost::hash_detail::limits::epsilon() != (T) 0); - if(x1(boost::hash_detail::limits::epsilon()) == x1((T) 0)) + BOOST_TEST(std::numeric_limits::epsilon() != (T) 0); + if(x1(std::numeric_limits::epsilon()) == x1((T) 0)) std::cerr<<"x1(epsilon) == x1(0) == "<::epsilon() != (T) 0); - if(x1(-boost::hash_detail::limits::epsilon()) == x1((T) 0)) + BOOST_TEST(-std::numeric_limits::epsilon() != (T) 0); + if(x1(-std::numeric_limits::epsilon()) == x1((T) 0)) std::cerr<<"x1(-epsilon) == x1(0) == "<::epsilon() != (T) 1); - if(x1((T) 1 + boost::hash_detail::limits::epsilon()) == x1((T) 1)) + BOOST_TEST((T) 1 + std::numeric_limits::epsilon() != (T) 1); + if(x1((T) 1 + std::numeric_limits::epsilon()) == x1((T) 1)) std::cerr<<"x1(1 + epsilon) == x1(1) == "<::epsilon() != (T) 1); - if(x1((T) 1 - boost::hash_detail::limits::epsilon()) == x1((T) 1)) + BOOST_TEST((T) 1 - std::numeric_limits::epsilon() != (T) 1); + if(x1((T) 1 - std::numeric_limits::epsilon()) == x1((T) 1)) std::cerr<<"x1(1 - epsilon) == x1(1) == "<::epsilon() != (T) -1); - if(x1((T) -1 + boost::hash_detail::limits::epsilon()) == x1((T) -1)) + BOOST_TEST((T) -1 + std::numeric_limits::epsilon() != (T) -1); + if(x1((T) -1 + std::numeric_limits::epsilon()) == x1((T) -1)) std::cerr<<"x1(-1 + epsilon) == x1(-1) == "<::epsilon() != (T) -1); - if(x1((T) -1 - boost::hash_detail::limits::epsilon()) == x1((T) -1)) + BOOST_TEST((T) -1 - std::numeric_limits::epsilon() != (T) -1); + if(x1((T) -1 - std::numeric_limits::epsilon()) == x1((T) -1)) std::cerr<<"x1(-1 - epsilon) == x1(-1) == "<::has_denorm) { - if(x1(boost::hash_detail::limits::denorm_min()) == x1(zero)) { + if(std::numeric_limits::has_denorm) { + if(x1(std::numeric_limits::denorm_min()) == x1(zero)) { std::cerr<<"x1(denorm_min) == x1(zero) == "<::denorm_min()) != - HASH_NAMESPACE::hash_value(boost::hash_detail::limits::denorm_min())) + if(x1(std::numeric_limits::denorm_min()) != + HASH_NAMESPACE::hash_value(std::numeric_limits::denorm_min())) { - std::cerr<<"x1(boost::hash_detail::limits::denorm_min()) = " - << x1(boost::hash_detail::limits::denorm_min()) - << "\nhash_value(boost::hash_detail::limits::denorm_min()) = " + std::cerr<<"x1(std::numeric_limits::denorm_min()) = " + << x1(std::numeric_limits::denorm_min()) + << "\nhash_value(std::numeric_limits::denorm_min()) = " << HASH_NAMESPACE::hash_value( - boost::hash_detail::limits::denorm_min()) + std::numeric_limits::denorm_min()) << "\nx1(0) = "<::has_quiet_NaN) { - if(x1(boost::hash_detail::limits::quiet_NaN()) == x1(1.0)) { + if(std::numeric_limits::has_quiet_NaN) { + if(x1(std::numeric_limits::quiet_NaN()) == x1(1.0)) { std::cerr<<"x1(quiet_NaN) == x1(1.0) == "<::quiet_NaN()) == - HASH_NAMESPACE::hash_value(boost::hash_detail::limits::quiet_NaN())); + BOOST_TEST(x1(std::numeric_limits::quiet_NaN()) == + HASH_NAMESPACE::hash_value(std::numeric_limits::quiet_NaN())); } #endif } @@ -231,6 +226,3 @@ int main() return boost::report_errors(); } -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif diff --git a/hash/test/hash_friend_test.cpp b/hash/test/hash_friend_test.cpp index 6c6596e..362a9cb 100644 --- a/hash/test/hash_friend_test.cpp +++ b/hash/test/hash_friend_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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 diff --git a/hash/test/hash_function_pointer_test.cpp b/hash/test/hash_function_pointer_test.cpp index 07a0300..92c8769 100644 --- a/hash/test/hash_function_pointer_test.cpp +++ b/hash/test/hash_function_pointer_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_fwd_test.hpp b/hash/test/hash_fwd_test.hpp index 30ad609..017b85d 100644 --- a/hash/test/hash_fwd_test.hpp +++ b/hash/test/hash_fwd_test.hpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_fwd_test_1.cpp b/hash/test/hash_fwd_test_1.cpp index e5106a3..9d401ec 100644 --- a/hash/test/hash_fwd_test_1.cpp +++ b/hash/test/hash_fwd_test_1.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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) // This checks that template code implemented using hash_fwd will work. diff --git a/hash/test/hash_fwd_test_2.cpp b/hash/test/hash_fwd_test_2.cpp index e334194..d29569b 100644 --- a/hash/test/hash_fwd_test_2.cpp +++ b/hash/test/hash_fwd_test_2.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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) // This test just makes sure a header which uses hash_fwd can compile without // the main hash headers. diff --git a/hash/test/hash_global_namespace_test.cpp b/hash/test/hash_global_namespace_test.cpp index a64f5eb..fa84d49 100644 --- a/hash/test/hash_global_namespace_test.cpp +++ b/hash/test/hash_global_namespace_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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) // This test demonstrates an ADL bug in Borland 5.5 where ADL isn't performed // in the global namespace. @@ -44,7 +44,7 @@ namespace boost # ifdef TEST_STD_INCLUDES # include # else -# include +# include # endif #endif diff --git a/hash/test/hash_list_test.cpp b/hash/test/hash_list_test.cpp index f61b6c4..f6df2ad 100644 --- a/hash/test/hash_list_test.cpp +++ b/hash/test/hash_list_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_map_test.cpp b/hash/test/hash_map_test.cpp index cbc9c50..6c15499 100644 --- a/hash/test/hash_map_test.cpp +++ b/hash/test/hash_map_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_map_test.hpp b/hash/test/hash_map_test.hpp index 1a56282..7ab13ea 100644 --- a/hash/test/hash_map_test.hpp +++ b/hash/test/hash_map_test.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) #if !defined(CONTAINER_TYPE) #error "CONTAINER_TYPE not defined" @@ -9,11 +9,6 @@ #include -#if defined(BOOST_MSVC) -#pragma warning(push) -#pragma warning(disable:4245) // signed/unsigned mismatch -#endif - namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) { template @@ -65,9 +60,5 @@ namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) } } -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif - #undef CONTAINER_TYPE #endif diff --git a/hash/test/hash_no_ext_fail_test.cpp b/hash/test/hash_no_ext_fail_test.cpp index bd123a9..597473a 100644 --- a/hash/test/hash_no_ext_fail_test.cpp +++ b/hash/test/hash_no_ext_fail_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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 HASH_NAMESPACE boost diff --git a/hash/test/hash_no_ext_macro_1.cpp b/hash/test/hash_no_ext_macro_1.cpp index c0f84ae..5924f4e 100644 --- a/hash/test/hash_no_ext_macro_1.cpp +++ b/hash/test/hash_no_ext_macro_1.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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 HASH_NAMESPACE boost #include diff --git a/hash/test/hash_no_ext_macro_2.cpp b/hash/test/hash_no_ext_macro_2.cpp index 75b05d7..53c6e8b 100644 --- a/hash/test/hash_no_ext_macro_2.cpp +++ b/hash/test/hash_no_ext_macro_2.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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 HASH_NAMESPACE boost #define BOOST_HASH_NO_EXTENSIONS diff --git a/hash/test/hash_number_test.cpp b/hash/test/hash_number_test.cpp index 6d8e5ac..218442b 100644 --- a/hash/test/hash_number_test.cpp +++ b/hash/test/hash_number_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" @@ -21,24 +21,17 @@ #include "./compile_time.hpp" -#if defined(BOOST_MSVC) -#pragma warning(push) -#pragma warning(disable:4127) // conditional expression is constant -#pragma warning(disable:4309) // truncation of constant value -#pragma warning(disable:4310) // cast truncates constant value -#endif - template void numeric_test(T*) { - typedef boost::hash_detail::limits limits; + typedef std::numeric_limits limits; compile_time_tests((T*) 0); HASH_NAMESPACE::hash x1; HASH_NAMESPACE::hash x2; - T v1 = (T) -5; + T v1 = -5; BOOST_TEST(x1(v1) == x2(v1)); BOOST_TEST(x1(T(-5)) == x2(T(-5))); BOOST_TEST(x1(T(0)) == x2(T(0))); @@ -55,8 +48,7 @@ void numeric_test(T*) if (limits::is_integer) { - BOOST_TEST(HASH_NAMESPACE::hash_value(T((std::size_t)-5)) - == (std::size_t)T(-5)); + BOOST_TEST(HASH_NAMESPACE::hash_value(T(-5)) == (std::size_t)T(-5)); BOOST_TEST(HASH_NAMESPACE::hash_value(T(0)) == (std::size_t)T(0u)); BOOST_TEST(HASH_NAMESPACE::hash_value(T(10)) == (std::size_t)T(10u)); BOOST_TEST(HASH_NAMESPACE::hash_value(T(25)) == (std::size_t)T(25u)); @@ -67,7 +59,7 @@ void numeric_test(T*) template void limits_test(T*) { - typedef boost::hash_detail::limits limits; + typedef std::numeric_limits limits; if(limits::is_specialized) { @@ -98,7 +90,7 @@ void limits_test(T*) template void poor_quality_tests(T*) { - typedef boost::hash_detail::limits limits; + typedef std::numeric_limits limits; HASH_NAMESPACE::hash x1; HASH_NAMESPACE::hash x2; @@ -113,29 +105,16 @@ void poor_quality_tests(T*) BOOST_TEST(x1((limits::max)()) != x2((limits::max)() - 1)); } -void bool_test() -{ - HASH_NAMESPACE::hash x1; - HASH_NAMESPACE::hash x2; - - BOOST_TEST(x1(true) == x2(true)); - BOOST_TEST(x1(false) == x2(false)); - BOOST_TEST(x1(true) != x2(false)); - BOOST_TEST(x1(false) != x2(true)); -} #define NUMERIC_TEST(type, name) \ std::cerr<<"Testing: " BOOST_STRINGIZE(name) "\n"; \ numeric_test((type*) 0); \ limits_test((type*) 0); \ poor_quality_tests((type*) 0); -#define NUMERIC_TEST_NO_LIMITS(type, name) \ - std::cerr<<"Testing: " BOOST_STRINGIZE(name) "\n"; \ - numeric_test((type*) 0); \ - poor_quality_tests((type*) 0); int main() { + NUMERIC_TEST(bool, bool) NUMERIC_TEST(char, char) NUMERIC_TEST(signed char, schar) NUMERIC_TEST(unsigned char, uchar) @@ -149,20 +128,11 @@ int main() NUMERIC_TEST(long, hash_long) NUMERIC_TEST(unsigned long, ulong) -#if defined(BOOST_HAS_LONG_LONG) - NUMERIC_TEST_NO_LIMITS(long long, hash_longlong) - NUMERIC_TEST_NO_LIMITS(unsigned long long, ulonglong) -#endif - NUMERIC_TEST(float, float) NUMERIC_TEST(double, double) NUMERIC_TEST(long double, ldouble) - bool_test(); - return boost::report_errors(); } -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif + diff --git a/hash/test/hash_pointer_test.cpp b/hash/test/hash_pointer_test.cpp index 78d3416..e38c31d 100644 --- a/hash/test/hash_pointer_test.cpp +++ b/hash/test/hash_pointer_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_range_test.cpp b/hash/test/hash_range_test.cpp index 9e5ef09..fc56ced 100644 --- a/hash/test/hash_range_test.cpp +++ b/hash/test/hash_range_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_sequence_test.hpp b/hash/test/hash_sequence_test.hpp index eb3295c..7668125 100644 --- a/hash/test/hash_sequence_test.hpp +++ b/hash/test/hash_sequence_test.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) #if !defined(CONTAINER_TYPE) #error "CONTAINER_TYPE not defined" @@ -9,11 +9,6 @@ #include -#if defined(BOOST_MSVC) -#pragma warning(push) -#pragma warning(disable:4245) // signed/unsigned mismatch -#endif - namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) { template @@ -68,9 +63,5 @@ namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) } } -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif - #undef CONTAINER_TYPE #endif diff --git a/hash/test/hash_set_test.cpp b/hash/test/hash_set_test.cpp index 442291c..e29334c 100644 --- a/hash/test/hash_set_test.cpp +++ b/hash/test/hash_set_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_set_test.hpp b/hash/test/hash_set_test.hpp index 50791a6..26ea1af 100644 --- a/hash/test/hash_set_test.hpp +++ b/hash/test/hash_set_test.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) #if !defined(CONTAINER_TYPE) #error "CONTAINER_TYPE not defined" @@ -9,17 +9,12 @@ #include -#if defined(BOOST_MSVC) -#pragma warning(push) -#pragma warning(disable:4245) // signed/unsigned mismatch -#endif - namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) { template void integer_tests(T* = 0) { - const int number_of_containers = 12; + const int number_of_containers = 11; T containers[number_of_containers]; for(int i = 0; i < 5; ++i) { @@ -35,11 +30,6 @@ namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) containers[9].insert(-1); containers[10].insert(-1); containers[10].insert(1); - containers[11].insert(1); - containers[11].insert(2); - containers[11].insert(3); - containers[11].insert(4); - containers[11].insert(5); HASH_NAMESPACE::hash hasher; @@ -71,9 +61,5 @@ namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests) } } -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif - #undef CONTAINER_TYPE #endif diff --git a/hash/test/hash_string_test.cpp b/hash/test/hash_string_test.cpp index 42ca0b7..85adacc 100644 --- a/hash/test/hash_string_test.cpp +++ b/hash/test/hash_string_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/hash_value_array_test.cpp b/hash/test/hash_value_array_test.cpp index 7080665..02444d8 100644 --- a/hash/test/hash_value_array_test.cpp +++ b/hash/test/hash_value_array_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // On some compilers hash_value isn't available for arrays, so I test it // separately from the main array tests. diff --git a/hash/test/hash_vector_test.cpp b/hash/test/hash_vector_test.cpp index bcc9c51..60bac31 100644 --- a/hash/test/hash_vector_test.cpp +++ b/hash/test/hash_vector_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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" diff --git a/hash/test/link_ext_test.cpp b/hash/test/link_ext_test.cpp index 41180ad..eeb1160 100644 --- a/hash/test/link_ext_test.cpp +++ b/hash/test/link_ext_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2006-2007 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) +// Copyright Daniel James 2006. Use, modification, and distribution are +// subject to 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 HASH_NAMESPACE boost #include @@ -17,7 +17,6 @@ int f(std::size_t hash1, int* x1) { std::vector x; x.push_back(*x1); HASH_NAMESPACE::hash > vector_hasher; - BOOST_TEST(vector_hasher(x) == HASH_NAMESPACE::hash_value(x)); - return boost::report_errors(); + return vector_hasher(x) != HASH_NAMESPACE::hash_value(x); } diff --git a/hash/test/link_no_ext_test.cpp b/hash/test/link_no_ext_test.cpp index a3db5b1..ab2701c 100644 --- a/hash/test/link_no_ext_test.cpp +++ b/hash/test/link_no_ext_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 HASH_NAMESPACE boost #define BOOST_HASH_NO_EXTENSIONS diff --git a/hash/test/link_test.cpp b/hash/test/link_test.cpp index eb8e51f..fae30cd 100644 --- a/hash/test/link_test.cpp +++ b/hash/test/link_test.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 diff --git a/hash/test/link_test_2.cpp b/hash/test/link_test_2.cpp index d40f1db..57d6528 100644 --- a/hash/test/link_test_2.cpp +++ b/hash/test/link_test_2.cpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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 diff --git a/include/boost/functional/detail/container_fwd.hpp b/include/boost/functional/detail/container_fwd.hpp index f3f82f2..d30bef3 100644 --- a/include/boost/functional/detail/container_fwd.hpp +++ b/include/boost/functional/detail/container_fwd.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) #if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP) #define BOOST_DETAIL_CONTAINER_FWD_HPP diff --git a/include/boost/functional/detail/float_functions.hpp b/include/boost/functional/detail/float_functions.hpp index 9aac5a2..34b8251 100644 --- a/include/boost/functional/detail/float_functions.hpp +++ b/include/boost/functional/detail/float_functions.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) #if !defined(BOOST_FUNCTIONAL_DETAIL_FLOAT_FUNCTIONS_HPP) #define BOOST_FUNCTIONAL_DETAIL_FLOAT_FUNCTIONS_HPP diff --git a/include/boost/functional/detail/hash_float.hpp b/include/boost/functional/detail/hash_float.hpp index 8735e8b..07d19c3 100644 --- a/include/boost/functional/detail/hash_float.hpp +++ b/include/boost/functional/detail/hash_float.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf @@ -15,9 +15,9 @@ #endif #include -#include #include #include +#include // Don't use fpclassify or _fpclass for stlport. #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) @@ -35,43 +35,10 @@ # endif #endif -// On OpenBSD, numeric_limits is not reliable for long doubles, but -// the macros defined in are. - -#if defined(__OpenBSD__) -#include -#endif - namespace boost { namespace hash_detail { - template - struct limits : std::numeric_limits {}; - -#if defined(__OpenBSD__) - template <> - struct limits - : std::numeric_limits - { - static long double epsilon() { - return LDBL_EPSILON; - } - - static long double (max)() { - return LDBL_MAX; - } - - static long double (min)() { - return LDBL_MIN; - } - - BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG); - BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); - BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); - }; -#endif // __OpenBSD__ - inline void hash_float_combine(std::size_t& seed, std::size_t value) { seed ^= value + (seed<<6) + (seed>>2); @@ -81,35 +48,21 @@ namespace boost inline std::size_t float_hash_impl(T v) { int exp = 0; + errno = 0; + v = boost::hash_detail::call_frexp(v, &exp); + if(errno) return 0; - // The result of frexp is always between 0.5 and 1, so its - // top bit will always be 1. Subtract by 0.5 to remove that. - if(v >= 0) { - v = boost::hash_detail::call_frexp(v, &exp) - T(0.5); - } - else { - v = -boost::hash_detail::call_frexp(v, &exp) - T(0.5); - exp = ~exp; - } + std::size_t seed = 0; - // TODO: Of course, this doesn't pass when hashing infinity or NaN. - //BOOST_ASSERT(0 <= v && v < 0.5); - - v = boost::hash_detail::call_ldexp(v, - limits::digits + 1); - std::size_t seed = static_cast(v); - v -= seed; - - // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; std::size_t const length - = (limits::digits * - boost::static_log2::radix>::value - 1) - / limits::digits; + = (std::numeric_limits::digits + + std::numeric_limits::digits - 1) + / std::numeric_limits::digits; - for(std::size_t i = 0; i != length; ++i) + for(std::size_t i = 0; i < length; ++i) { - v = boost::hash_detail::call_ldexp(v, limits::digits); - std::size_t part = static_cast(v); + v = boost::hash_detail::call_ldexp(v, std::numeric_limits::digits); + int const part = static_cast(v); v -= part; hash_float_combine(seed, part); } @@ -161,7 +114,7 @@ namespace boost return 0; } #else - return v == 0 ? 0 : float_hash_impl(v); + return float_hash_impl(v); #endif } } diff --git a/include/boost/functional/hash.hpp b/include/boost/functional/hash.hpp index f07350e..65e19b1 100644 --- a/include/boost/functional/hash.hpp +++ b/include/boost/functional/hash.hpp @@ -1,14 +1,10 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. #include - -#if !defined(BOOST_HASH_NO_EXTENSIONS) -#include -#endif diff --git a/include/boost/functional/hash/deque.hpp b/include/boost/functional/hash/deque.hpp index 4503941..0f688cd 100644 --- a/include/boost/functional/hash/deque.hpp +++ b/include/boost/functional/hash/deque.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2006 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf diff --git a/include/boost/functional/hash/extensions.hpp b/include/boost/functional/hash/extensions.hpp deleted file mode 100644 index 3681e0e..0000000 --- a/include/boost/functional/hash/extensions.hpp +++ /dev/null @@ -1,182 +0,0 @@ - -// Copyright 2005-2007 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) - -// Based on Peter Dimov's proposal -// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf -// issue 6.18. - -#if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) -#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -namespace boost -{ - -#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - namespace hash_detail - { - template - struct call_hash_impl - { - template - struct inner - { - static std::size_t call(T const& v) - { - using namespace boost; - return hash_value(v); - } - }; - }; - - template <> - struct call_hash_impl - { - template - struct inner - { -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - static std::size_t call(Array const& v) -#else - static std::size_t call(Array& v) -#endif - { - const int size = sizeof(v) / sizeof(*v); - return boost::hash_range(v, v + size); - } - }; - }; - - template - struct call_hash - : public call_hash_impl::value> - ::BOOST_NESTED_TEMPLATE inner - { - }; - } -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - - template struct hash - : std::unary_function - { -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - std::size_t operator()(T const& val) const - { - return hash_value(val); - } -#else - std::size_t operator()(T const& val) const - { - return hash_detail::call_hash::call(val); - } -#endif - }; - -#if BOOST_WORKAROUND(__DMC__, <= 0x848) - template struct hash - : std::unary_function - { - std::size_t operator()(const T* val) const - { - return boost::hash_range(val, val+n); - } - }; -#endif - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // On compilers without partial specialization, boost::hash - // has already been declared to deal with pointers, so just - // need to supply the non-pointer version. - - namespace hash_detail - { - template - struct hash_impl; - -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - - template <> - struct hash_impl - { - template - struct inner - : std::unary_function - { -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - std::size_t operator()(T const& val) const - { - return hash_value(val); - } -#else - std::size_t operator()(T const& val) const - { - return hash_detail::call_hash::call(val); - } -#endif - }; - }; - -#else // Visual C++ 6.5 - - // There's probably a more elegant way to Visual C++ 6.5 to work - // but I don't know what it is. - - template - struct hash_impl_msvc - { - template - struct inner - : public std::unary_function - { - std::size_t operator()(T const& val) const - { - return hash_detail::call_hash::call(val); - } - - std::size_t operator()(T& val) const - { - return hash_detail::call_hash::call(val); - } - }; - }; - - template <> - struct hash_impl_msvc - { - template - struct inner - : public std::unary_function - { - std::size_t operator()(T& val) const - { - return hash_detail::call_hash::call(val); - } - }; - }; - - template - struct hash_impl_msvc2 - : public hash_impl_msvc::value> - ::BOOST_NESTED_TEMPLATE inner {}; - - template <> - struct hash_impl - { - template - struct inner : public hash_impl_msvc2 {}; - }; - -#endif // Visual C++ 6.5 - } -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -} - -#endif diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 0ddfe2a..993977e 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2007. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf @@ -10,10 +10,6 @@ #if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) #define BOOST_FUNCTIONAL_HASH_HASH_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - #include #include #include @@ -32,24 +28,29 @@ #include #endif +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4267) +#endif + namespace boost { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + // Borland complains about an ambiguous function overload + // when compiling boost::hash. std::size_t hash_value(bool); - std::size_t hash_value(char); - std::size_t hash_value(unsigned char); - std::size_t hash_value(signed char); - std::size_t hash_value(short); - std::size_t hash_value(unsigned short); +#endif + std::size_t hash_value(int); std::size_t hash_value(unsigned int); std::size_t hash_value(long); std::size_t hash_value(unsigned long); -#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) - std::size_t hash_value(wchar_t); -#endif - -#if defined(BOOST_HAS_LONG_LONG) +#if defined(BOOST_HAS_LONG_LONG) && defined(_M_X64) && defined(_WIN64) + // On 64-bit windows std::size_t is a typedef for unsigned long long, which + // isn't due to be supported until Boost 1.35. So add support here. + // (Technically, Boost.Hash isn't actually documented as supporting + // std::size_t. But it would be pretty silly not to). std::size_t hash_value(long long); std::size_t hash_value(unsigned long long); #endif @@ -92,84 +93,14 @@ namespace boost template std::size_t hash_value(std::multimap const& v); - template - std::size_t hash_value(std::complex const&); - // Implementation - namespace hash_detail - { - template - inline std::size_t hash_value_signed(T val) - { - const int size_t_bits = std::numeric_limits::digits; - // ceiling(std::numeric_limits::digits / size_t_bits) - 1 - const int length = (std::numeric_limits::digits - 1) - / size_t_bits; - - std::size_t seed = 0; - T positive = val < 0 ? -1 - val : val; - - // Hopefully, this loop can be unrolled. - for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) - { - seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); - } - seed ^= (std::size_t) val + (seed<<6) + (seed>>2); - - return seed; - } - - template - inline std::size_t hash_value_unsigned(T val) - { - const int size_t_bits = std::numeric_limits::digits; - // ceiling(std::numeric_limits::digits / size_t_bits) - 1 - const int length = (std::numeric_limits::digits - 1) - / size_t_bits; - - std::size_t seed = 0; - - // Hopefully, this loop can be unrolled. - for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) - { - seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); - } - seed ^= (std::size_t) val + (seed<<6) + (seed>>2); - - return seed; - } - } - +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) inline std::size_t hash_value(bool v) { return static_cast(v); } - - inline std::size_t hash_value(char v) - { - return static_cast(v); - } - - inline std::size_t hash_value(unsigned char v) - { - return static_cast(v); - } - - inline std::size_t hash_value(signed char v) - { - return static_cast(v); - } - - inline std::size_t hash_value(short v) - { - return static_cast(v); - } - - inline std::size_t hash_value(unsigned short v) - { - return static_cast(v); - } +#endif inline std::size_t hash_value(int v) { @@ -191,22 +122,15 @@ namespace boost return static_cast(v); } -#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) - inline std::size_t hash_value(wchar_t v) - { - return static_cast(v); - } -#endif - -#if defined(BOOST_HAS_LONG_LONG) +#if defined(BOOST_HAS_LONG_LONG) && defined(_M_X64) && defined(_WIN64) inline std::size_t hash_value(long long v) { - return hash_detail::hash_value_signed(v); + return v; } inline std::size_t hash_value(unsigned long long v) { - return hash_detail::hash_value_unsigned(v); + return v; } #endif @@ -368,15 +292,6 @@ namespace boost return hash_range(v.begin(), v.end()); } - template - std::size_t hash_value(std::complex const& v) - { - boost::hash hasher; - std::size_t seed = hasher(v.imag()); - seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); - return seed; - } - // // boost::hash // @@ -507,3 +422,181 @@ namespace boost } #endif // BOOST_FUNCTIONAL_HASH_HASH_HPP + +//////////////////////////////////////////////////////////////////////////////// + +#if !defined(BOOST_HASH_NO_EXTENSIONS) \ + && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) +#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP + +namespace boost +{ + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + namespace hash_detail + { + template + struct call_hash_impl + { + template + struct inner + { + static std::size_t call(T const& v) + { + using namespace boost; + return hash_value(v); + } + }; + }; + + template <> + struct call_hash_impl + { + template + struct inner + { +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + static std::size_t call(Array const& v) +#else + static std::size_t call(Array& v) +#endif + { + const int size = sizeof(v) / sizeof(*v); + return boost::hash_range(v, v + size); + } + }; + }; + + template + struct call_hash + : public call_hash_impl::value> + ::BOOST_NESTED_TEMPLATE inner + { + }; + } +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + + template struct hash + : std::unary_function + { +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + std::size_t operator()(T const& val) const + { + return hash_value(val); + } +#else + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } +#endif + }; + +#if BOOST_WORKAROUND(__DMC__, <= 0x848) + template struct hash + : std::unary_function + { + std::size_t operator()(const T* val) const + { + return boost::hash_range(val, val+n); + } + }; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // On compilers without partial specialization, boost::hash + // has already been declared to deal with pointers, so just + // need to supply the non-pointer version. + + namespace hash_detail + { + template + struct hash_impl; + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + + template <> + struct hash_impl + { + template + struct inner + : std::unary_function + { +#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) + std::size_t operator()(T const& val) const + { + return hash_value(val); + } +#else + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } +#endif + }; + }; + +#else // Visual C++ 6.5 + + // There's probably a more elegant way to Visual C++ 6.5 to work + // but I don't know what it is. + + template + struct hash_impl_msvc + { + template + struct inner + : public std::unary_function + { + std::size_t operator()(T const& val) const + { + return hash_detail::call_hash::call(val); + } + + std::size_t operator()(T& val) const + { + return hash_detail::call_hash::call(val); + } + }; + }; + + template <> + struct hash_impl_msvc + { + template + struct inner + : public std::unary_function + { + std::size_t operator()(T& val) const + { + return hash_detail::call_hash::call(val); + } + }; + }; + + template + struct hash_impl_msvc2 + : public hash_impl_msvc::value> + ::BOOST_NESTED_TEMPLATE inner {}; + + template <> + struct hash_impl + { + template + struct inner : public hash_impl_msvc2 {}; + }; + +#endif // Visual C++ 6.5 + } +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + diff --git a/include/boost/functional/hash/list.hpp b/include/boost/functional/hash/list.hpp index 80e0932..f332462 100644 --- a/include/boost/functional/hash/list.hpp +++ b/include/boost/functional/hash/list.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2006 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf diff --git a/include/boost/functional/hash/map.hpp b/include/boost/functional/hash/map.hpp index 34cd7eb..10526a1 100644 --- a/include/boost/functional/hash/map.hpp +++ b/include/boost/functional/hash/map.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2006 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf diff --git a/include/boost/functional/hash/pair.hpp b/include/boost/functional/hash/pair.hpp index 69a5483..9c54671 100644 --- a/include/boost/functional/hash/pair.hpp +++ b/include/boost/functional/hash/pair.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2006 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf diff --git a/include/boost/functional/hash/set.hpp b/include/boost/functional/hash/set.hpp index 9a7f866..53923e1 100644 --- a/include/boost/functional/hash/set.hpp +++ b/include/boost/functional/hash/set.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2006 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf diff --git a/include/boost/functional/hash/vector.hpp b/include/boost/functional/hash/vector.hpp index 298b9ef..5a75f8c 100644 --- a/include/boost/functional/hash/vector.hpp +++ b/include/boost/functional/hash/vector.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2006 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf diff --git a/include/boost/functional/hash_fwd.hpp b/include/boost/functional/hash_fwd.hpp index 4d103f7..dcbe659 100644 --- a/include/boost/functional/hash_fwd.hpp +++ b/include/boost/functional/hash_fwd.hpp @@ -1,7 +1,7 @@ -// Copyright 2005-2007 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) +// Copyright Daniel James 2005-2006. Use, modification, and distribution are +// subject to 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf