diff --git a/include/boost/unordered/detail/buckets.hpp b/include/boost/unordered/detail/buckets.hpp index 14314398..4bfae1c9 100644 --- a/include/boost/unordered/detail/buckets.hpp +++ b/include/boost/unordered/detail/buckets.hpp @@ -20,11 +20,6 @@ #include #include -#if defined(BOOST_MSVC) -#pragma warning(push) -#pragma warning(disable:4127) // conditional expression is constant -#endif - namespace boost { namespace unordered { namespace detail { template struct table; @@ -799,8 +794,4 @@ namespace boost { namespace unordered { namespace detail { #endif }}} -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif - #endif diff --git a/include/boost/unordered/detail/table.hpp b/include/boost/unordered/detail/table.hpp index 83a35f3c..4198a8f7 100644 --- a/include/boost/unordered/detail/table.hpp +++ b/include/boost/unordered/detail/table.hpp @@ -13,6 +13,11 @@ #include #include +#if defined(BOOST_MSVC) +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif + namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// @@ -895,4 +900,8 @@ namespace boost { namespace unordered { namespace detail { } }}} +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + #endif