mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
Use make_iterator_range
[SVN r20527]
This commit is contained in:
@@ -30,9 +30,7 @@ boost::python::indexing::iterator_range<int *> get_array_plain()
|
||||
{
|
||||
static int array[] = { 8, 6, 4, 2, 1, 3, 5, 7, 0 };
|
||||
|
||||
return boost::python::indexing::iterator_range<int *>
|
||||
(boost::python::indexing::begin(array)
|
||||
, boost::python::indexing::end(array));
|
||||
return boost::python::indexing::make_iterator_range (array);
|
||||
}
|
||||
|
||||
boost::python::indexing::iterator_range<int_wrapper *> get_array_wrap()
|
||||
@@ -42,9 +40,7 @@ boost::python::indexing::iterator_range<int_wrapper *> get_array_wrap()
|
||||
, int_wrapper(1), int_wrapper(3), int_wrapper(5)
|
||||
, int_wrapper(7), int_wrapper(0) };
|
||||
|
||||
return boost::python::indexing::iterator_range<int_wrapper *>
|
||||
(boost::python::indexing::begin(array)
|
||||
, boost::python::indexing::end(array));
|
||||
return boost::python::indexing::make_iterator_range (array);
|
||||
}
|
||||
|
||||
BOOST_PYTHON_MODULE(test_array_ext)
|
||||
|
||||
Reference in New Issue
Block a user