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.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| common_type | Loading commit data... | |
| debug | Loading commit data... | |
| exception | Loading commit data... | |
| hash_fn | Loading commit data... | |
| io | Loading commit data... | |
| native_type | Loading commit data... | |
| performance | Loading commit data... | |
| pstl | Loading commit data... | |
| regression | Loading commit data... | |
| statistic | Loading commit data... | |
| thread | Loading commit data... | |
| replacement_memory_operators.h | Loading commit data... | |
| slow_clock.h | Loading commit data... | |
| specfun_testcase.h | Loading commit data... | |
| testsuite_abi.cc | Loading commit data... | |
| testsuite_abi.h | Loading commit data... | |
| testsuite_abi_check.cc | Loading commit data... | |
| testsuite_allocator.cc | Loading commit data... | |
| testsuite_allocator.h | Loading commit data... | |
| testsuite_api.h | Loading commit data... | |
| testsuite_character.cc | Loading commit data... | |
| testsuite_character.h | Loading commit data... | |
| testsuite_common_types.h | Loading commit data... | |
| testsuite_container_traits.h | Loading commit data... | |
| testsuite_containergen.h | Loading commit data... | |
| testsuite_containers.h | Loading commit data... | |
| testsuite_counter_type.h | Loading commit data... | |
| testsuite_error.h | Loading commit data... | |
| testsuite_fs.h | Loading commit data... | |
| testsuite_greedy_ops.h | Loading commit data... | |
| testsuite_hooks.cc | Loading commit data... | |
| testsuite_hooks.h | Loading commit data... | |
| testsuite_io.h | Loading commit data... | |
| testsuite_iterators.h | Loading commit data... | |
| testsuite_new_operators.h | Loading commit data... | |
| testsuite_performance.h | Loading commit data... | |
| testsuite_random.h | Loading commit data... | |
| testsuite_regex.h | Loading commit data... | |
| testsuite_rng.h | Loading commit data... | |
| testsuite_rvalref.h | Loading commit data... | |
| testsuite_shared.cc | Loading commit data... | |
| testsuite_tr1.h | Loading commit data... |