Condition macro workarounds on _MSC_EXTENSIONS instead of _MSC_VER. Fixes #84.

This commit is contained in:
Peter Dimov
2025-06-27 02:10:14 +03:00
parent 7df84b35eb
commit aa3b1c464d
4 changed files with 10 additions and 26 deletions

View File

@@ -28,26 +28,22 @@
// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'and' being an alternative token
#if defined(_MSC_VER) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(and)
#if defined(_MSC_EXTENSIONS)
#if defined(and)
# pragma push_macro("and")
# undef and
# define and(x)
#endif
#endif
#endif
# define BOOST_MPL_PREPROCESSED_HEADER and.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(and)
#if defined(_MSC_EXTENSIONS)
#if defined(and)
# pragma pop_macro("and")
#endif
#endif
#endif
#else

View File

@@ -19,27 +19,23 @@
// macros, see http://tinyurl.com/ycwdxco; 'defined(bitand)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'bitand' being an alternative token
#if defined(_MSC_VER) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(_MSC_EXTENSIONS)
#if defined(bitand)
# pragma push_macro("bitand")
# undef bitand
# define bitand(x)
#endif
#endif
#endif
#define AUX778076_OP_NAME bitand_
#define AUX778076_OP_PREFIX bitand
#define AUX778076_OP_TOKEN &
#include <boost/mpl/aux_/arithmetic_op.hpp>
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(_MSC_EXTENSIONS)
#if defined(bitand)
# pragma pop_macro("bitand")
#endif
#endif
#endif
#endif // BOOST_MPL_BITAND_HPP_INCLUDED

View File

@@ -19,27 +19,23 @@
// macros, see http://tinyurl.com/ycwdxco; 'defined(bitor)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'bitor' being an alternative token
#if defined(_MSC_VER) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(_MSC_EXTENSIONS)
#if defined(bitor)
# pragma push_macro("bitor")
# undef bitor
# define bitor(x)
#endif
#endif
#endif
#define AUX778076_OP_NAME bitor_
#define AUX778076_OP_PREFIX bitor
#define AUX778076_OP_TOKEN |
#include <boost/mpl/aux_/arithmetic_op.hpp>
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(_MSC_EXTENSIONS)
#if defined(bitor)
# pragma pop_macro("bitor")
#endif
#endif
#endif
#endif // BOOST_MPL_BITOR_HPP_INCLUDED

View File

@@ -29,26 +29,22 @@
// '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)&& !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(_MSC_EXTENSIONS)
#if defined(or)
# pragma push_macro("or")
# undef or
# define or(x)
#endif
#endif
#endif
# define BOOST_MPL_PREPROCESSED_HEADER or.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__cplusplus)
#ifndef __GCCXML__
#if defined(_MSC_EXTENSIONS)
#if defined(or)
# pragma pop_macro("or")
#endif
#endif
#endif
#else