From 26af234c23f0eeea3474f10b3e89aff5a82bb896 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 16 Nov 2013 20:36:27 +0000 Subject: [PATCH] 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] --- hash/doc/rationale.qbk | 2 +- include/boost/functional/hash/hash.hpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hash/doc/rationale.qbk b/hash/doc/rationale.qbk index 8621081..76ff6d1 100644 --- a/hash/doc/rationale.qbk +++ b/hash/doc/rationale.qbk @@ -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. There are several options 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 well as a hash algorithm tailored for the input. diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 0adf9c9..42ea019 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -29,11 +29,15 @@ #if defined(BOOST_MSVC) #pragma warning(push) + +#if BOOST_MSVC >= 1400 #pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values // are always of range '0' to '4294967295'. // Loop executes infinitely. #endif +#endif + #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits