[boost][range] - Improved handling of temporary ranges in range algorithms.

[SVN r63903]
This commit is contained in:
Neil Groves
2010-07-12 00:12:49 +00:00
parent ef000176d8
commit 74a01a4487
57 changed files with 1178 additions and 216 deletions

View File

@ -62,6 +62,28 @@ namespace boost
check_result(reference, reference_result,
test_cont, test_result);
test_result = boost::set_intersection(
boost::make_iterator_range(cont1), cont2,
test_cont.begin());
check_result(reference, reference_result,
test_cont, test_result);
test_result = boost::set_intersection(
cont1, boost::make_iterator_range(cont2),
test_cont.begin());
check_result(reference, reference_result,
test_cont, test_result);
test_result = boost::set_intersection(
boost::make_iterator_range(cont1),
boost::make_iterator_range(cont2),
test_cont.begin());
check_result(reference, reference_result,
test_cont, test_result);
}
template<class Container, class BinaryPredicate>
@ -100,6 +122,28 @@ namespace boost
check_result(reference, reference_result,
test_cont, test_result);
test_result = boost::set_intersection(
boost::make_iterator_range(cont1), cont2,
test_cont.begin(), pred);
check_result(reference, reference_result,
test_cont, test_result);
test_result = boost::set_intersection(
cont1, boost::make_iterator_range(cont2),
test_cont.begin(), pred);
check_result(reference, reference_result,
test_cont, test_result);
test_result = boost::set_intersection(
boost::make_iterator_range(cont1),
boost::make_iterator_range(cont2),
test_cont.begin(), pred);
check_result(reference, reference_result,
test_cont, test_result);
}
template<class Container1, class Container2>