mirror of
https://github.com/boostorg/range.git
synced 2026-01-25 00:12:22 +01:00
[boost][range] - Improved handling of temporary ranges in range algorithms.
[SVN r63903]
This commit is contained in:
@@ -49,6 +49,17 @@ namespace
|
||||
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(reference.begin(), reference.end(),
|
||||
test.begin(), test.end());
|
||||
|
||||
test.clear();
|
||||
|
||||
test_append(
|
||||
boost::unique_copy(boost::make_iterator_range(c),
|
||||
std::back_inserter(test)),
|
||||
value_type()
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(reference.begin(), reference.end(),
|
||||
test.begin(), test.end());
|
||||
}
|
||||
|
||||
template<class Container, class Pred>
|
||||
@@ -70,6 +81,17 @@ namespace
|
||||
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(reference.begin(), reference.end(),
|
||||
test.begin(), test.end());
|
||||
|
||||
test.clear();
|
||||
|
||||
test_append(
|
||||
boost::unique_copy(boost::make_iterator_range(c),
|
||||
std::back_inserter(test), pred),
|
||||
value_type()
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(reference.begin(), reference.end(),
|
||||
test.begin(), test.end());
|
||||
}
|
||||
|
||||
template<class Container, class Pred>
|
||||
|
||||
Reference in New Issue
Block a user