c++: alias template equivalence and CTAD [PR103852]
commit5d583d24200ac33a1cb281b7ddee9aad351151b5
authorJason Merrill <jason@redhat.com>
Mon, 4 Apr 2022 15:56:38 +0000 (4 11:56 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 5 Apr 2022 16:29:33 +0000 (5 12:29 -0400)
tree1cfc2dfb4e7a0fffc6c757a414a607705c266a0a
parent1de6612d994ada8edaab18bbc6afd8e9a57413aa
c++: alias template equivalence and CTAD [PR103852]

I had been thinking about DR1286 "equivalence" as meaning generally
interchangeable, but looking back at the proposed resolution in the context
of this PR, I see that it's just about use as a template argument.  So let's
give a pedwarn if we look through a renaming alias.

PR c++/103852
DR 1286

gcc/cp/ChangeLog:

* pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/class-deduction-alias1.C: Expect warning.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1z/class-deduction-alias1.C