Hash: A single unified algorithm for hashing floats.

Attempts to automatically use a binary hash for floats where it's known to
work, and then use the generic hash algorithm as a fallback.

[SVN r80177]
This commit is contained in:
Daniel James
2012-08-24 22:52:42 +00:00
parent f1de575546
commit eec47991f9
4 changed files with 182 additions and 162 deletions
+14 -1
View File
@@ -1,5 +1,5 @@
# Copyright 2005-2011 Daniel James.
# Copyright 2005-2012 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)
@@ -66,4 +66,17 @@ test-suite functional/hash_no_ext
[ run link_test.cpp link_test_2.cpp : : : <define>BOOST_HASH_NO_EXTENSIONS : no_ext_link_test ]
;
# Tests to see if the floating point hash is using the binary hash.
# Not run normally because on some platforms these should fail.
test-suite functional/hash_no_generic_float
:
[ run hash_float_test.cpp
: : : <define>BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC
: hash_float_test_no_generic ]
[ run hash_long_double_test.cpp
: : : <define>BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC
: hash_long_double_test_no_generic ]
;
explicit functional/hash_no_generic_float ;
build-project ../examples ;