2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-25 18:32:24 +00:00

consolidation of workarounds for missing "not" keyword

[SVN r21276]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2003-12-15 17:55:38 +00:00
parent 1f522823ff
commit 4a0d7965cb

View File

@@ -21,7 +21,9 @@
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
// vc7.1 seems to require this (incorrectly) in order to use the "not" keyword
#include <ciso646>
#elif BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
#elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__GNUC__, <= 2) \
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
#define not !
#endif
@@ -91,11 +93,7 @@ BOOST_PYTHON_MODULE(operators_ext)
.def(pow(self,self))
.def(pow(self,int()))
.def(pow(int(),self))
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__GNUC__, <= 2)
.def(!self) // it doesn't know about the "not" keyword!
#else
.def(not self)
#endif
;
class_<test_class<1> >("Z", init<int>())