diff --git a/include/boost/python/class.hpp b/include/boost/python/class.hpp index d409f9b9..f43b615a 100644 --- a/include/boost/python/class.hpp +++ b/include/boost/python/class.hpp @@ -45,8 +45,7 @@ # if BOOST_WORKAROUND(__MWERKS__, <= 0x3004) \ /* pro9 reintroduced the bug */ \ || (BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) \ - || BOOST_WORKAROUND(__GNUC__, < 3) + && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) # define BOOST_PYTHON_NO_MEMBER_POINTER_ORDERING 1 diff --git a/include/boost/python/copy_const_reference.hpp b/include/boost/python/copy_const_reference.hpp index 19e3b423..55bede13 100644 --- a/include/boost/python/copy_const_reference.hpp +++ b/include/boost/python/copy_const_reference.hpp @@ -16,7 +16,7 @@ namespace detail { template struct copy_const_reference_expects_a_const_reference_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/copy_non_const_reference.hpp b/include/boost/python/copy_non_const_reference.hpp index 78b70f5d..15fef62d 100644 --- a/include/boost/python/copy_non_const_reference.hpp +++ b/include/boost/python/copy_non_const_reference.hpp @@ -16,7 +16,7 @@ namespace detail { template struct copy_non_const_reference_expects_a_non_const_reference_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/default_call_policies.hpp b/include/boost/python/default_call_policies.hpp index 3d32d2eb..fcc242a9 100644 --- a/include/boost/python/default_call_policies.hpp +++ b/include/boost/python/default_call_policies.hpp @@ -23,7 +23,7 @@ namespace detail { // for "readable" error messages template struct specify_a_return_value_policy_to_wrap_functions_returning -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/manage_new_object.hpp b/include/boost/python/manage_new_object.hpp index d81421da..9585b13a 100644 --- a/include/boost/python/manage_new_object.hpp +++ b/include/boost/python/manage_new_object.hpp @@ -17,7 +17,7 @@ namespace detail { template struct manage_new_object_requires_a_pointer_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/object/pointer_holder.hpp b/include/boost/python/object/pointer_holder.hpp index 4627e34a..27d95193 100644 --- a/include/boost/python/object/pointer_holder.hpp +++ b/include/boost/python/object/pointer_holder.hpp @@ -46,11 +46,7 @@ template class wrapper; namespace boost { namespace python { namespace objects { -# if BOOST_WORKAROUND(__GNUC__, == 2) -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)objects::do_unforward(a##n,0) -# else -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0) -# endif +#define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0) template struct pointer_holder : instance_holder diff --git a/include/boost/python/object/value_holder.hpp b/include/boost/python/object/value_holder.hpp index f4d452ca..a4e91786 100644 --- a/include/boost/python/object/value_holder.hpp +++ b/include/boost/python/object/value_holder.hpp @@ -33,11 +33,7 @@ namespace boost { namespace python { namespace objects { -# if BOOST_WORKAROUND(__GNUC__, == 2) -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)objects::do_unforward(a##n,0) -# else -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0) -# endif +#define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0) template struct value_holder : instance_holder diff --git a/include/boost/python/object_core.hpp b/include/boost/python/object_core.hpp index 0b1b660c..a730d3d8 100644 --- a/include/boost/python/object_core.hpp +++ b/include/boost/python/object_core.hpp @@ -238,23 +238,9 @@ namespace api template typename objects::unforward_cref::type do_unforward_cref(T const& x) { -# if BOOST_WORKAROUND(__GNUC__, == 2) - typedef typename objects::unforward_cref::type ret; - return ret(x); -# else return x; -# endif } -# if BOOST_WORKAROUND(__GNUC__, == 2) - // GCC 2.x has non-const string literals; this hacks around that problem. - template - char const (& do_unforward_cref(char const(&x)[N]) )[N] - { - return x; - } -# endif - class object; template diff --git a/include/boost/python/reference_existing_object.hpp b/include/boost/python/reference_existing_object.hpp index bb8ddf73..8c241071 100644 --- a/include/boost/python/reference_existing_object.hpp +++ b/include/boost/python/reference_existing_object.hpp @@ -17,7 +17,7 @@ namespace detail { template struct reference_existing_object_requires_a_pointer_or_reference_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/return_arg.hpp b/include/boost/python/return_arg.hpp old mode 100755 new mode 100644 index c36f898d..e869a58d --- a/include/boost/python/return_arg.hpp +++ b/include/boost/python/return_arg.hpp @@ -29,7 +29,7 @@ namespace detail { template struct return_arg_pos_argument_must_be_positive -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/return_internal_reference.hpp b/include/boost/python/return_internal_reference.hpp index acb89e6d..cc60f442 100644 --- a/include/boost/python/return_internal_reference.hpp +++ b/include/boost/python/return_internal_reference.hpp @@ -18,7 +18,7 @@ namespace detail { template struct return_internal_reference_owner_arg_must_be_greater_than_zero -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) +# if defined(__GNUC__) || defined(__EDG__) {} # endif ; diff --git a/include/boost/python/to_python_value.hpp b/include/boost/python/to_python_value.hpp index a48948d2..aaabb9cf 100644 --- a/include/boost/python/to_python_value.hpp +++ b/include/boost/python/to_python_value.hpp @@ -147,11 +147,6 @@ namespace detail template inline PyObject* registry_to_python_value::operator()(argument_type x) const { - typedef converter::registered r; -# if BOOST_WORKAROUND(__GNUC__, < 3) - // suppresses an ICE, somehow - (void)r::converters; -# endif return converter::registered::converters.to_python(&x); } diff --git a/include/boost/python/type_id.hpp b/include/boost/python/type_id.hpp index 7873a2f2..f22e5b9b 100644 --- a/include/boost/python/type_id.hpp +++ b/include/boost/python/type_id.hpp @@ -19,7 +19,6 @@ # ifndef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE # if defined(__GNUC__) \ - && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) \ && !defined(__EDG_VERSION__) # define BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE # endif @@ -30,7 +29,7 @@ namespace boost { namespace python { // for this compiler at least, cross-shared-library type_info // comparisons don't work, so use typeid(x).name() instead. It's not // yet clear what the best default strategy is. -# if (defined(__GNUC__) && __GNUC__ >= 3) \ +# if defined(__GNUC__) \ || defined(_AIX) \ || ( defined(__sgi) && defined(__host_mips)) \ || (defined(__hpux) && defined(__HP_aCC)) \