From b75f06d9357ca3ce5ba17fc66e4fd4c677b4cd55 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 14 Nov 2008 16:11:16 +0000 Subject: [PATCH] Use pragmas to suppress a Visual C++ warning. [SVN r49756] --- include/boost/unordered/unordered_map.hpp | 13 +++++++++++++ include/boost/unordered/unordered_set.hpp | 13 +++++++++++++ 2 files changed, 26 insertions(+) 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