4512b7d851
This adds a tests that verifies taking the split_view of a non-forward range works correctly. Doing so revealed a typo in one of _OuterIter's constructors. It also revealed that the default constructor of __gnu_test::test_range::iterator misbehaves, because by delegating to Iter<T>(nullptr, nullptr) we perform a null-pointer deref at runtime in input_iterator_wrapper's constructor due to the ITERATOR_VERIFY check therein. Instead of delegating to this constructor it seems we can just inherit the protected default constructor, which does not contain this ITERATOR_VERIFY check. libstdc++-v3/ChangeLog: * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix, 'address' -> 'std::__addressof'. * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of a non-forward input_range. * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make default constructor protected instead of deleted, like with input_iterator_wrapper. (test_range::iterator): Add comment explaining that this type is used only when the underlying wrapper is input_iterator_wrapper or output_iterator_wrapper. Remove delegating defaulted constructor so that the inherited default constructor is used instead. |
||
---|---|---|
.. | ||
backward | ||
bits | ||
c | ||
c_compatibility | ||
c_global | ||
c_std | ||
debug | ||
decimal | ||
experimental | ||
ext | ||
parallel | ||
precompiled | ||
pstl | ||
std | ||
tr1 | ||
tr2 | ||
Makefile.am | ||
Makefile.in |