0614bbbe59
Here, in the constexpr if condition within ranges::unique_copy, when input_iterator<_Out> isn't satisfied we must avoid substituting into iter_value_t<_Out> because the latter isn't necessarily well-formed then. To that end, this patch factors out the condition into a concept and uses it throughout. This patch also makes the definition of our testsuite output_iterator_wrapper more minimal by setting its value_type, pointer and reference member types to void. This means our existing tests for unique_copy already exercise the fix for this bug, so we don't need to add another test. The only other fallout of this testsuite iterator change appears in std/ranges/range.cc, where the use of range_value_t on a test_output_range is now ill-formed. libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__detail::__can_reread_output): Factor out this concept from ... (__unique_copy_fn::operator()): ... here. Use the concept throughout. * testsuite/std/ranges/range.cc: Remove now ill-formed use of range_value_t on an output_range. * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Define value_type, pointer and reference member types to void. |
||
---|---|---|
.. | ||
atomic | ||
common_type | ||
debug | ||
exception | ||
hash_fn | ||
io | ||
native_type | ||
performance | ||
pstl | ||
regression | ||
statistic | ||
thread | ||
replacement_memory_operators.h | ||
slow_clock.h | ||
specfun_testcase.h | ||
testsuite_abi_check.cc | ||
testsuite_abi.cc | ||
testsuite_abi.h | ||
testsuite_allocator.cc | ||
testsuite_allocator.h | ||
testsuite_api.h | ||
testsuite_character.cc | ||
testsuite_character.h | ||
testsuite_common_types.h | ||
testsuite_container_traits.h | ||
testsuite_containergen.h | ||
testsuite_containers.h | ||
testsuite_counter_type.h | ||
testsuite_error.h | ||
testsuite_fs.h | ||
testsuite_greedy_ops.h | ||
testsuite_hooks.cc | ||
testsuite_hooks.h | ||
testsuite_io.h | ||
testsuite_iterators.h | ||
testsuite_new_operators.h | ||
testsuite_performance.h | ||
testsuite_random.h | ||
testsuite_regex.h | ||
testsuite_rng.h | ||
testsuite_rvalref.h | ||
testsuite_shared.cc | ||
testsuite_tr1.h |