From 8338b2fb4962d06e78429d1c790a1c38fe0060fd Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 26 Jul 2004 14:27:17 +0000 Subject: [PATCH] Stop using "not" [SVN r24081] --- test/operators.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/test/operators.cpp b/test/operators.cpp index c8dabdbe..d6a8fdb9 100755 --- a/test/operators.cpp +++ b/test/operators.cpp @@ -19,15 +19,6 @@ // trouble for non-conforming compilers and libraries. #include -#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) -// vc7.1 seems to require this (incorrectly) in order to use the "not" keyword -#include -#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_ >("Z", init())