gcc/libstdc++-v3/testsuite/24_iterators
Jonathan Wakely a5f2fb1ff1 libstdc++: Replace deduced return type in ranges::iter_move (PR 92894)
The deduced return type causes the instantiation of the function body,
which can then require the instantiation of std::projected::operator*
which is intentionally not defined.

This patch uses a helper trait to define the return type, so that the
function body doesn't need to be instantiated. That helper trait can
then also be used in other places that currently check the return type
of ranges::iter_move (iter_rvalue_reference_t and indirectly_readable).

2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
	    Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/92894
	* include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
	Add trait to determine return type and an alias for it.
	(ranges::__cust_imove::_IMove::operator()): Use __result instead of
	deduced return type.
	(iter_rvalue_reference_t): Use _IMove::__type instead of checking
	the result of ranges::iter_move.
	(__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
	instead of checking the result of ranges::iter_move.
	* testsuite/24_iterators/customization_points/92894.cc: New test.
	* testsuite/24_iterators/indirect_callable/92894.cc: New test.
2020-05-01 14:27:25 +01:00
..
associated_types libstdc++: Implement P1878R1 "Constraining Readable Types" 2020-02-07 16:58:43 +00:00
back_insert_iterator libstdc++: Implement C++20 changes to insert iterators 2020-03-27 23:26:01 +00:00
bidirectional Update copyright years. 2020-01-01 12:51:42 +01:00
common_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
contiguous Update copyright years. 2020-01-01 12:51:42 +01:00
counted_iterator libstdc++: Add a move-only testsuite iterator type 2020-03-03 22:44:35 -05:00
customization_points libstdc++: Replace deduced return type in ranges::iter_move (PR 92894) 2020-05-01 14:27:25 +01:00
forward Update copyright years. 2020-01-01 12:51:42 +01:00
front_insert_iterator libstdc++: Implement C++20 changes to insert iterators 2020-03-27 23:26:01 +00:00
headers/iterator libstdc++: Implement C++20 changes to insert iterators 2020-03-27 23:26:01 +00:00
indirect_callable libstdc++: Replace deduced return type in ranges::iter_move (PR 92894) 2020-05-01 14:27:25 +01:00
input Update copyright years. 2020-01-01 12:51:42 +01:00
insert_iterator libstdc++: Fixes for feature test macros (PR 91480) 2020-04-28 23:40:18 +01:00
istream_iterator libstdc++: Fix noexcept-specifier for istream_iterator 2020-02-24 14:22:21 +00:00
istreambuf_iterator libstdc++: Add test for using istreambuf_iterator with sentinel 2020-04-20 22:06:32 +01:00
move_iterator libstdc++: Fix std::reverse_iterator relational operators 2020-03-28 21:52:13 +00:00
normal_iterator libstdc++: Fix __normal_iterator comparisons for C++20 2020-04-21 23:46:54 +01:00
operations Update copyright years. 2020-01-01 12:51:42 +01:00
ostream_iterator libstdc++: Change compile-only test to run 2020-03-10 09:47:15 +00:00
ostreambuf_iterator Update copyright years. 2020-01-01 12:51:42 +01:00
output Update copyright years. 2020-01-01 12:51:42 +01:00
random_access Update copyright years. 2020-01-01 12:51:42 +01:00
range_access Update copyright years. 2020-01-01 12:51:42 +01:00
range_operations libstdc++: test for failing assertion should use 'run' not 'compile' 2020-02-28 18:41:18 +00:00
reverse_iterator libstdc++: Fix std::reverse_iterator relational operators 2020-03-28 21:52:13 +00:00
aliases.cc libstdc++: Remove workarounds for constraints on alias templates 2020-02-05 15:09:23 +00:00
container_access.cc Update copyright years. 2020-01-01 12:51:42 +01:00