mirror of
https://github.com/boostorg/functional.git
synced 2025-08-01 21:44:28 +02:00
Fix Visual C++ warning in hash. Refs #8568.
I changed this a little from the patch on #8568. I moved the pragmas to the start and end of the file because I don't like to little the body of the code with them (this does mean I've disabled a potentially useful warning, but the code is pretty stable nowadays). I also removed the version checks, as the warning should be present in later versions. [SVN r85248]
This commit is contained in:
@@ -27,6 +27,13 @@
|
|||||||
#include <typeindex>
|
#include <typeindex>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC)
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values
|
||||||
|
// are always of range '0' to '4294967295'.
|
||||||
|
// Loop executes infinitely.
|
||||||
|
#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
|
||||||
@@ -518,6 +525,10 @@ namespace boost
|
|||||||
|
|
||||||
#undef BOOST_HASH_CHAR_TRAITS
|
#undef BOOST_HASH_CHAR_TRAITS
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP
|
#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP
|
||||||
|
|
||||||
// Include this outside of the include guards in case the file is included
|
// Include this outside of the include guards in case the file is included
|
||||||
|
Reference in New Issue
Block a user