Boost.Range merge from trunk to release.

This is motivated by the need to correct the istream_range, to correct the adaptors.hpp header file, and correct the return types of various range algorithms.

[SVN r61517]
This commit is contained in:
Neil Groves
2010-04-23 22:50:56 +00:00
parent dfc30e334d
commit a47f15a98f
223 changed files with 2754 additions and 2666 deletions

View File

@ -21,6 +21,15 @@
namespace
{
struct DoubleValue
{
template< class Value >
Value operator()(Value x)
{
return x * 2;
}
};
template< class Container >
void test_push_front_impl(std::size_t n)
{
@ -34,10 +43,14 @@ namespace
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
test.begin(), test.end() );
// Do it again to push onto non-empty container
reference.insert(reference.begin(), reference.begin(), reference.end());
// copy the orignal reference sequence
Container reference_copy(reference);
std::transform(reference.begin(), reference.end(), reference.begin(), DoubleValue());
boost::push_front(test, boost::irange<std::size_t>(0, n));
// Do it again to push onto non-empty container
reference.insert(reference.end(), reference_copy.begin(), reference_copy.end());
boost::push_front(test, boost::irange<std::size_t>(0, n * 2, 2));
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
test.begin(), test.end() );