https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92894
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:a5f2fb1ff1742685a91dfdf78da871fd4d3292e5 commit r11-10-ga5f2fb1ff1742685a91dfdf78da871fd4d3292e5 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri May 1 14:27:25 2020 +0100 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 <jwak...@redhat.com> Patrick Palka <ppa...@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.