Skip to content

Commit badedbe

Browse files
committed
Python: Remove obsolete GCC version checks.
[SVN r86066]
1 parent cc80f46 commit badedbe

13 files changed

+11
-40
lines changed

include/boost/python/class.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
# if BOOST_WORKAROUND(__MWERKS__, <= 0x3004) \
4646
/* pro9 reintroduced the bug */ \
4747
|| (BOOST_WORKAROUND(__MWERKS__, > 0x3100) \
48-
&& BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) \
49-
|| BOOST_WORKAROUND(__GNUC__, < 3)
48+
&& BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201)))
5049

5150
# define BOOST_PYTHON_NO_MEMBER_POINTER_ORDERING 1
5251

include/boost/python/copy_const_reference.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace detail
1616
{
1717
template <class R>
1818
struct copy_const_reference_expects_a_const_reference_return_type
19-
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
19+
# if defined(__GNUC__) || defined(__EDG__)
2020
{}
2121
# endif
2222
;

include/boost/python/copy_non_const_reference.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace detail
1616
{
1717
template <class R>
1818
struct copy_non_const_reference_expects_a_non_const_reference_return_type
19-
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
19+
# if defined(__GNUC__) || defined(__EDG__)
2020
{}
2121
# endif
2222
;

include/boost/python/default_call_policies.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace detail
2323
{
2424
// for "readable" error messages
2525
template <class T> struct specify_a_return_value_policy_to_wrap_functions_returning
26-
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
26+
# if defined(__GNUC__) || defined(__EDG__)
2727
{}
2828
# endif
2929
;

include/boost/python/manage_new_object.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace detail
1717
{
1818
template <class R>
1919
struct manage_new_object_requires_a_pointer_return_type
20-
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
20+
# if defined(__GNUC__) || defined(__EDG__)
2121
{}
2222
# endif
2323
;

include/boost/python/object/pointer_holder.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ template <class T> class wrapper;
4646

4747
namespace boost { namespace python { namespace objects {
4848

49-
# if BOOST_WORKAROUND(__GNUC__, == 2)
50-
# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward<A##n>::type)objects::do_unforward(a##n,0)
51-
# else
52-
# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0)
53-
# endif
49+
#define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0)
5450

5551
template <class Pointer, class Value>
5652
struct pointer_holder : instance_holder

include/boost/python/object/value_holder.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@
3333

3434
namespace boost { namespace python { namespace objects {
3535

36-
# if BOOST_WORKAROUND(__GNUC__, == 2)
37-
# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward<A##n>::type)objects::do_unforward(a##n,0)
38-
# else
39-
# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0)
40-
# endif
36+
#define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0)
4137

4238
template <class Value>
4339
struct value_holder : instance_holder

include/boost/python/object_core.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -238,23 +238,9 @@ namespace api
238238
template <class T>
239239
typename objects::unforward_cref<T>::type do_unforward_cref(T const& x)
240240
{
241-
# if BOOST_WORKAROUND(__GNUC__, == 2)
242-
typedef typename objects::unforward_cref<T>::type ret;
243-
return ret(x);
244-
# else
245241
return x;
246-
# endif
247242
}
248243

249-
# if BOOST_WORKAROUND(__GNUC__, == 2)
250-
// GCC 2.x has non-const string literals; this hacks around that problem.
251-
template <unsigned N>
252-
char const (& do_unforward_cref(char const(&x)[N]) )[N]
253-
{
254-
return x;
255-
}
256-
# endif
257-
258244
class object;
259245

260246
template <class T>

include/boost/python/reference_existing_object.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace detail
1717
{
1818
template <class R>
1919
struct reference_existing_object_requires_a_pointer_or_reference_return_type
20-
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
20+
# if defined(__GNUC__) || defined(__EDG__)
2121
{}
2222
# endif
2323
;

include/boost/python/return_arg.hpp

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace detail
2929
{
3030
template <std::size_t>
3131
struct return_arg_pos_argument_must_be_positive
32-
# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__)
32+
# if defined(__GNUC__) || defined(__EDG__)
3333
{}
3434
# endif
3535
;

0 commit comments

Comments
 (0)