Skip to content

[bugfix] Fix iteratortest

Carsten Gräser requested to merge feature/fix-iteratortest into master
  • While testForwardIterator() prints to std::cerr its result was ignored in testBidirectionalIterator() such that a failure in the former would still lead to a passed test. Now we also capture errors in testForwardIterator().
  • 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.

Merge request reports

Loading