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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
2
include/boost/python/return_arg.hpp
Executable file → Normal 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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)) \
|
||||
|
||||
Reference in New Issue
Block a user