Gather does not (in general) work with forward iterators, even though it does on some systems

[SVN r83158]
This commit is contained in:
Marshall Clow
2013-02-25 22:31:52 +00:00
parent 5f45246c6c
commit ef16153353
3 changed files with 18 additions and 19 deletions

View File

@ -55,14 +55,12 @@ void test_iterators ( Iterator first, Iterator last, Predicate comp, std::size_t
template <typename Container, typename Predicate>
void test_iterator_types ( const Container &c, Predicate comp, std::size_t offset ) {
typedef std::vector<typename Container::value_type> vec;
typedef forward_iterator<typename vec::iterator> FI;
typedef bidirectional_iterator<typename vec::iterator> BDI;
typedef random_access_iterator<typename vec::iterator> RAI;
vec v;
v.assign ( c.begin (), c.end ());
test_iterators ( FI ( v.begin ()), FI ( v.end ()), comp, offset );
v.assign ( c.begin (), c.end ());
test_iterators ( BDI ( v.begin ()), BDI ( v.end ()), comp, offset );
v.assign ( c.begin (), c.end ());
test_iterators ( RAI ( v.begin ()), RAI ( v.end ()), comp, offset );