2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Python: Remove obsolete GCC version checks.

[SVN r86066]
This commit is contained in:
Stephen Kelly
2013-09-30 15:58:19 +00:00
parent cc80f46a6d
commit badedbebfc
13 changed files with 11 additions and 40 deletions

View File

@@ -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

View File

@@ -16,7 +16,7 @@ namespace detail
{
template <class R>
struct copy_const_reference_expects_a_const_reference_return_type
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;

View File

@@ -16,7 +16,7 @@ namespace detail
{
template <class R>
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
;

View File

@@ -23,7 +23,7 @@ namespace detail
{
// for "readable" error messages
template <class T> struct specify_a_return_value_policy_to_wrap_functions_returning
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;

View File

@@ -17,7 +17,7 @@ namespace detail
{
template <class R>
struct manage_new_object_requires_a_pointer_return_type
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;

View File

@@ -46,11 +46,7 @@ template <class T> 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<A##n>::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 <class Pointer, class Value>
struct pointer_holder : instance_holder

View File

@@ -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<A##n>::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 <class Value>
struct value_holder : instance_holder

View File

@@ -238,23 +238,9 @@ namespace api
template <class T>
typename objects::unforward_cref<T>::type do_unforward_cref(T const& x)
{
# if BOOST_WORKAROUND(__GNUC__, == 2)
typedef typename objects::unforward_cref<T>::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 <unsigned N>
char const (& do_unforward_cref(char const(&x)[N]) )[N]
{
return x;
}
# endif
class object;
template <class T>

View File

@@ -17,7 +17,7 @@ namespace detail
{
template <class R>
struct reference_existing_object_requires_a_pointer_or_reference_return_type
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;

2
include/boost/python/return_arg.hpp Executable file → Normal file
View File

@@ -29,7 +29,7 @@ namespace detail
{
template <std::size_t>
struct return_arg_pos_argument_must_be_positive
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;

View File

@@ -18,7 +18,7 @@ namespace detail
{
template <std::size_t>
struct return_internal_reference_owner_arg_must_be_greater_than_zero
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;

View File

@@ -147,11 +147,6 @@ namespace detail
template <class T>
inline PyObject* registry_to_python_value<T>::operator()(argument_type x) const
{
typedef converter::registered<argument_type> r;
# if BOOST_WORKAROUND(__GNUC__, < 3)
// suppresses an ICE, somehow
(void)r::converters;
# endif
return converter::registered<argument_type>::converters.to_python(&x);
}

View File

@@ -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)) \