c++: concepts TS and explicit specialization [PR101098]
commitddd25bd1a7c8f456bc914e34b77d43f39a1062d4
authorJason Merrill <jason@redhat.com>
Fri, 9 Jul 2021 17:50:01 +0000 (9 13:50 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 9 Jul 2021 20:11:48 +0000 (9 16:11 -0400)
treeaf8f3ede0050bbaf3ae25927c5504c3f1891ff88
parentd5b1bb0d197f9141a0f0e510f8d1b598c3df9552
c++: concepts TS and explicit specialization [PR101098]

duplicate_decls was not recognizing the explicit specialization as matching
the implicit specialization of g<Y> because
function_requirements_equivalent_p was seeing the C constraint on the
implicit one and not on the explicit.

PR c++/101098

gcc/cp/ChangeLog:

* decl.c (function_requirements_equivalent_p): Only compare
trailing requirements on a specialization.

gcc/testsuite/ChangeLog:

* g++.dg/concepts/explicit-spec1.C: New test.
gcc/cp/decl.c
gcc/testsuite/g++.dg/concepts/explicit-spec1.C [new file with mode: 0644]