2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-31 08:22:18 +00:00

Stop using "not"

[SVN r24081]
This commit is contained in:
Dave Abrahams
2004-07-26 14:27:17 +00:00
parent fed0b09c4e
commit 8338b2fb49

View File

@@ -19,15 +19,6 @@
// trouble for non-conforming compilers and libraries.
#include <math.h>
#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(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__GNUC__, <= 2) \
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
#define not !
#endif
using namespace boost::python;
struct X : test_class<>
@@ -94,7 +85,14 @@ BOOST_PYTHON_MODULE(operators_ext)
.def(pow(self,self))
.def(pow(self,int()))
.def(pow(int(),self))
.def(not self)
.def(
!self
// "not self" is legal here but causes friction on a few
// nonconforming compilers; it's cute because it looks
// like python, but doing it here doesn't prove much and
// just causes tests to fail or complicated workarounds to
// be enacted.
)
;
class_<test_class<1> >("Z", init<int>())