diff --git a/include/boost/mpl/and.hpp b/include/boost/mpl/and.hpp index a2cced8..3e8008a 100644 --- a/include/boost/mpl/and.hpp +++ b/include/boost/mpl/and.hpp @@ -28,9 +28,27 @@ # include "boost/mpl/aux_/void_spec.hpp" # include "boost/mpl/aux_/lambda_support.hpp" +// agurt, 19/may/04: workaround a conflict with header's +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' +// has to be checked in a separate condition, otherwise GCC complains +// about 'or' being an alternative token +#if defined(_MSC_VER) +#if defined(and) +# pragma push_macro("and") +# undef and +# define and(x) +#endif +#endif + # define BOOST_MPL_PREPROCESSED_HEADER and.hpp # include "boost/mpl/aux_/include_preprocessed.hpp" +#if defined(_MSC_VER) +#if defined(and) +# pragma pop_macro("and") +#endif +#endif + #else # define AUX_LOGICAL_OP_NAME and_ diff --git a/include/boost/mpl/or.hpp b/include/boost/mpl/or.hpp index 297088e..55bb7c5 100644 --- a/include/boost/mpl/or.hpp +++ b/include/boost/mpl/or.hpp @@ -28,9 +28,27 @@ # include "boost/mpl/aux_/void_spec.hpp" # include "boost/mpl/aux_/lambda_support.hpp" +// agurt, 19/may/04: workaround a conflict with header's +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' +// has to be checked in a separate condition, otherwise GCC complains +// about 'or' being an alternative token +#if defined(_MSC_VER) +#if defined(or) +# pragma push_macro("or") +# undef or +# define or(x) +#endif +#endif + # define BOOST_MPL_PREPROCESSED_HEADER or.hpp # include "boost/mpl/aux_/include_preprocessed.hpp" +#if defined(_MSC_VER) +#if defined(or) +# pragma pop_macro("or") +#endif +#endif + #else # define AUX_LOGICAL_OP_NAME or_