diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 3aacea1..0568c07 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -70,6 +70,11 @@ # define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE () #endif +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant. +#endif + namespace boost { namespace detail { namespace function { @@ -793,6 +798,10 @@ public: } // end namespace boost +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + // Cleanup after ourselves... #undef BOOST_FUNCTION_VTABLE #undef BOOST_FUNCTION_DEFAULT_ALLOCATOR