Ticket #9474: has_new_operator.hpp.patch

File has_new_operator.hpp.patch, 966 bytes (added by anonymous, 9 years ago)
  • has_new_operator.hpp

     
    1818// should be the last #include
    1919#include <boost/type_traits/detail/bool_trait_def.hpp>
    2020
     21#if defined(new)
     22  #define BOOST_TT_AUX_MACRO_NEW_DEFINED
     23  #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310)
     24    #pragma push_macro("new")
     25  #else
     26    #error Unsupported compiler. Macro "new" must be hidden.
     27  #endif
     28  #undef new
     29#endif
     30
    2131namespace boost {
    2232namespace detail {
    2333    template <class U, U x>
     
    135145
    136146} // namespace boost
    137147
     148#if defined(BOOST_TT_AUX_MACRO_NEW_DEFINED)
     149  #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310)
     150    #pragma pop_macro("new")
     151  #endif
     152  #undef BOOST_TT_AUX_MACRO_NEW_DEFINED
     153#endif
     154
    138155#include <boost/type_traits/detail/bool_trait_undef.hpp>
    139156
    140157#endif // BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED