https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108282
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:26741a0f64686648a5b39415d819f1acfd4ad6d2 commit r12-9027-g26741a0f64686648a5b39415d819f1acfd4ad6d2 Author: Patrick Palka <ppa...@redhat.com> Date: Wed Jan 4 14:12:25 2023 -0500 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. (cherry picked from commit 238e292cf5d822f3bd12d9b58eb04cf377758b2a)