Index: has_new_operator.hpp =================================================================== --- has_new_operator.hpp (revision 2) +++ has_new_operator.hpp (working copy) @@ -18,6 +18,16 @@ // should be the last #include #include +#if defined(new) + #define BOOST_TT_AUX_MACRO_NEW_DEFINED + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) + #pragma push_macro("new") + #else + #error Unsupported compiler. Macro "new" must be hidden. + #endif + #undef new +#endif + namespace boost { namespace detail { template @@ -135,6 +145,13 @@ } // namespace boost +#if defined(BOOST_TT_AUX_MACRO_NEW_DEFINED) + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) + #pragma pop_macro("new") + #endif + #undef BOOST_TT_AUX_MACRO_NEW_DEFINED +#endif + #include #endif // BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED