Add missing ::type in the range-based partition_point implementation. Add test for this call - since there was none before. Thanks to Wygos for the fix.

This commit is contained in:
Marshall Clow
2014-06-18 19:16:34 +02:00
parent 5af84327ad
commit b9d91c59e4
2 changed files with 8 additions and 1 deletions

View File

@ -54,6 +54,13 @@ void test_sequence ( Container &v, Predicate comp, int expected ) {
std::cout << "Expected(2): " << std::distance ( v.begin (), exp )
<< ", got: " << std::distance ( v.begin (), res ) << std::endl;
BOOST_CHECK ( exp == res );
// Range based test
res = ba::partition_point ( v, comp );
exp = offset_to_iter ( v, expected );
std::cout << "Expected(3): " << std::distance ( v.begin (), exp )
<< ", got: " << std::distance ( v.begin (), res ) << std::endl;
BOOST_CHECK ( exp == res );
}
template <typename T>