diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 868c189c..edbee93a 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -21,6 +21,15 @@ #include #endif +#if defined(BOOST_MSVC) +#pragma warning(push) +#if BOOST_MSVC >= 1400 +#pragma warning(disable:4396) //the inline specifier cannot be used when a + // friend declaration refers to a specialization + // of a function template +#endif +#endif + namespace boost { template @@ -785,4 +794,8 @@ namespace boost } // namespace boost +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + #endif // BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index 42b6adaa..c8d0d1e1 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -21,6 +21,15 @@ #include #endif +#if defined(BOOST_MSVC) +#pragma warning(push) +#if BOOST_MSVC >= 1400 +#pragma warning(disable:4396) //the inline specifier cannot be used when a + // friend declaration refers to a specialization + // of a function template +#endif +#endif + namespace boost { template @@ -742,4 +751,8 @@ namespace boost } // namespace boost +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + #endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED