Skip to content

Commit 11aaebf

Browse files
committed
Stop testing c++98 support
1 parent c5e545b commit 11aaebf

File tree

10 files changed

+23
-21
lines changed

10 files changed

+23
-21
lines changed

.github/workflows/test-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
python: [python, python3]
1313
cxx: [g++, clang++]
14-
std: [c++98, c++11, c++14, c++17]
14+
std: [c++11, c++14, c++17]
1515
include:
1616
# Add the appropriate docker image for each compiler.
1717
# The images from teeks99/boost-python-test already have boost::python

fabscript

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ from faber.config.try_run import try_run
1616

1717
features += include('include')
1818
features += define('BOOST_ALL_NO_LIB') # disable auto-linking
19+
features += define('BOOST_NO_AUTO_PTR')
1920
boost_include = options.get_with('boost-include')
2021
if boost_include:
2122
features += include(boost_include)

include/boost/python/detail/is_auto_ptr.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# ifndef BOOST_NO_AUTO_PTR
99
# include <boost/python/detail/is_xxx.hpp>
1010
# include <memory>
11+
# else
12+
# include <boost/mpl/bool.hpp>
1113
# endif
1214

1315
namespace boost { namespace python { namespace detail {

test/back_reference.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ BOOST_PYTHON_MODULE(back_reference_ext)
9999
.def("set", &Y::set)
100100
;
101101

102-
class_<Z,std::auto_ptr<Z> >("Z", init<int>())
102+
class_<Z,std::shared_ptr<Z> >("Z", init<int>())
103103
.def("value", &Z::value)
104104
.def("set", &Z::set)
105105
;

test/copy_ctor_mutates_rhs.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99

1010
struct foo
1111
{
12-
operator std::auto_ptr<int>&() const;
12+
operator std::shared_ptr<int>&() const;
1313
};
1414

1515
int main()
1616
{
1717
using namespace boost::python::detail;
1818
BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<int>::value);
19-
BOOST_STATIC_ASSERT(copy_ctor_mutates_rhs<std::auto_ptr<int> >::value);
2019
BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<std::string>::value);
2120
BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<foo>::value);
2221
return 0;

test/fabscript

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ for t in [('injected',),
118118

119119
tests.append(extension_test('shared_ptr',
120120
condition=set.define.contains('HAS_CXX11')))
121-
tests.append(extension_test('polymorphism2_auto_ptr',
122-
condition=set.define.contains('HAS_CXX11').not_()))
123-
tests.append(extension_test('auto_ptr',
124-
condition=set.define.contains('HAS_CXX11')))
121+
#tests.append(extension_test('polymorphism2_auto_ptr',
122+
# condition=set.define.contains('HAS_CXX11').not_()))
123+
#tests.append(extension_test('auto_ptr',
124+
# condition=set.define.contains('HAS_CXX11')))
125125

126126
import_ = binary('import_', ['import_.cpp', src.bpl], features=features|python_libs)
127127
if platform.os == 'Windows':

test/injected.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef test_class<> X;
1717

1818
X* empty() { return new X(1000); }
1919

20-
std::auto_ptr<X> sum(int a, int b) { return std::auto_ptr<X>(new X(a+b)); }
20+
std::shared_ptr<X> sum(int a, int b) { return std::shared_ptr<X>(new X(a+b)); }
2121

2222
boost::shared_ptr<X> product(int a, int b, int c)
2323
{

test/operators_wrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ BOOST_PYTHON_MODULE( operators_wrapper_ext )
3636
;
3737

3838
scope().attr("v") = vector();
39-
std::auto_ptr<vector> dp(new dvector);
40-
register_ptr_to_python< std::auto_ptr<vector> >();
39+
std::shared_ptr<vector> dp(new dvector);
40+
register_ptr_to_python< std::shared_ptr<vector> >();
4141
scope().attr("d") = dp;
4242
}

test/select_holder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ int test_main(int, char * [])
6262
assert_holder<Base,Derived
6363
,value_holder_back_reference<Base,Derived> >();
6464

65-
assert_holder<Base,std::auto_ptr<Base>
66-
,pointer_holder<std::auto_ptr<Base>,Base> >();
65+
assert_holder<Base,std::unique_ptr<Base>
66+
,pointer_holder<std::unique_ptr<Base>,Base> >();
6767

68-
assert_holder<Base,std::auto_ptr<Derived>
69-
,pointer_holder_back_reference<std::auto_ptr<Derived>,Base> >();
68+
assert_holder<Base,std::unique_ptr<Derived>
69+
,pointer_holder_back_reference<std::unique_ptr<Derived>,Base> >();
7070

71-
assert_holder<BR,std::auto_ptr<BR>
72-
,pointer_holder_back_reference<std::auto_ptr<BR>,BR> > ();
71+
assert_holder<BR,std::unique_ptr<BR>
72+
,pointer_holder_back_reference<std::unique_ptr<BR>,BR> > ();
7373

7474
return 0;
7575
}

test/wrapper_held_type.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ struct data
2020
}
2121
};
2222

23-
std::auto_ptr<data> create_data()
23+
std::shared_ptr<data> create_data()
2424
{
25-
return std::auto_ptr<data>( new data );
25+
return std::shared_ptr<data>( new data );
2626
}
2727

28-
void do_nothing( std::auto_ptr<data>& ){}
28+
void do_nothing( std::shared_ptr<data>& ){}
2929

3030

3131
namespace bp = boost::python;
@@ -59,7 +59,7 @@ struct data_wrapper : data, bp::wrapper< data >
5959

6060
BOOST_PYTHON_MODULE(wrapper_held_type_ext)
6161
{
62-
bp::class_< data_wrapper, std::auto_ptr< data > >( "data" )
62+
bp::class_< data_wrapper, std::shared_ptr< data > >( "data" )
6363
.def( "id", &data::id, &::data_wrapper::default_id );
6464

6565
bp::def( "do_nothing", &do_nothing );

0 commit comments

Comments
 (0)