[bugfix] Fix iteratortest
- While
testForwardIterator()
prints tostd::cerr
its result was ignored intestBidirectionalIterator()
such that a failure in the former would still lead to a passed test. Now we also capture errors intestForwardIterator()
. -
testBidirectionalIterator()
returned on the first error. Now we continue the test to potentially find more errors at once. - Fix requirements on forward iterators. C++14 does not require
that two iterators compare equal if they are default-initialized,
but only if they are value-initialized. This makes a difference
for POD types: Raw pointers are valid forward iterators (used e.g.
in
std::array
) since value-initialization zero-initializes them, altough default-initialization would leave them uninitialized.