]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Implement P2538R1 ADL-proof std::projected
authorJonathan Wakely <jwakely@redhat.com>
Fri, 23 Jun 2023 11:18:11 +0000 (12:18 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 26 Jun 2023 16:43:22 +0000 (17:43 +0100)
commit6eafdfc73c21d7a5e59e18c9dee275af5bf6d979
tree5bb575f5e95bd5be4da9309de4dd07d4d5d8cdd5
parentfa98bc4270dcb4ec78b5b1c0f4c067094c84bae6
libstdc++: Implement P2538R1 ADL-proof std::projected

This was recently approved for C++26, but there's no harm in
implementing it unconditionally for C++20 and C++23. As it says in the
paper, it doesn't change the meaning of any valid code. It only enables
things that were previously ill-formed for questionable reasons.

libstdc++-v3/ChangeLog:

* include/bits/iterator_concepts.h (projected): Replace class
template with alias template denoting an ADL-proofed helper.
(incremental_traits<projected<Iter, Proj>>): Remove.
* testsuite/24_iterators/indirect_callable/projected-adl.cc:
New test.
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/testsuite/24_iterators/indirect_callable/projected-adl.cc [new file with mode: 0644]
This page took 0.059305 seconds and 6 git commands to generate.