]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: mark_single_function and SFINAE [PR108282]
authorPatrick Palka <ppalka@redhat.com>
Wed, 4 Jan 2023 19:12:25 +0000 (14:12 -0500)
committerPatrick Palka <ppalka@redhat.com>
Wed, 4 Jan 2023 19:12:25 +0000 (14:12 -0500)
commit238e292cf5d822f3bd12d9b58eb04cf377758b2a
treec2ee369fd5e91ad6a5ae9332e8be96d523224352
parentfc349931adcf1024ee95e0a0cd98cf4a41996093
c++: mark_single_function and SFINAE [PR108282]

We typically ignore mark_used failure when in a non-SFINAE context for
sake of better error recovery.  But in mark_single_function we're
instead ignoring mark_used failure in a SFINAE context, which ends up
causing the second static_assert here to incorrectly fail.

PR c++/108282

gcc/cp/ChangeLog:

* decl2.cc (mark_single_function): Ignore mark_used failure
only in a non-SFINAE context rather than in a SFINAE one.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-requires34.C: New test.
gcc/cp/decl2.cc
gcc/testsuite/g++.dg/cpp2a/concepts-requires34.C [new file with mode: 0644]