Merge unordered and hash from trunk.

- Only use Visual C++ pragma with appropriate compilers.
- Working link for Thomas Wang's hash function.
- Updated unordered rationale.
- Fix `unnecessary_copy_tests` for Visual C++ 12.
- Some extra insert tests.


[SVN r86728]
This commit is contained in:
Daniel James
2013-11-16 20:36:27 +00:00
parent f5731a878f
commit 26af234c23
2 changed files with 5 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ For other use cases, if you do need a higher quality hash function,
then neither the standard hash function or `boost::hash` are appropriate. then neither the standard hash function or `boost::hash` are appropriate.
There are several options There are several options
available. One is to use a second hash on the output of this hash available. One is to use a second hash on the output of this hash
function, such as [@http://www.concentric.net/~ttwang/tech/inthash.htm function, such as [@http://web.archive.org/web/20121102023700/http://www.concentric.net/~Ttwang/tech/inthash.htm
Thomas Wang's hash function]. This this may not work as Thomas Wang's hash function]. This this may not work as
well as a hash algorithm tailored for the input. well as a hash algorithm tailored for the input.

View File

@@ -29,11 +29,15 @@
#if defined(BOOST_MSVC) #if defined(BOOST_MSVC)
#pragma warning(push) #pragma warning(push)
#if BOOST_MSVC >= 1400
#pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values #pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values
// are always of range '0' to '4294967295'. // are always of range '0' to '4294967295'.
// Loop executes infinitely. // Loop executes infinitely.
#endif #endif
#endif
#if BOOST_WORKAROUND(__GNUC__, < 3) \ #if BOOST_WORKAROUND(__GNUC__, < 3) \
&& !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
#define BOOST_HASH_CHAR_TRAITS string_char_traits #define BOOST_HASH_CHAR_TRAITS string_char_traits