c++: var tmpl w/ dependent constrained auto type [PR103341]
authorPatrick Palka <ppalka@redhat.com>
Fri, 28 Jan 2022 13:18:28 +0000 (08:18 -0500)
committerPatrick Palka <ppalka@redhat.com>
Fri, 28 Jan 2022 13:18:28 +0000 (08:18 -0500)
commite272cf95ba048fde60b21aee046c9ca9c9264425
treec01aa3ddac711f93d53ca276143591cd6ec6d239
parent9ec306582fd60e5b76f07eb81c9ed2415d9a3590
c++: var tmpl w/ dependent constrained auto type [PR103341]

When deducing the type of a variable template (or templated static data
member) with a constrained auto type, we might need its template
arguments for satisfaction since the constraint could depend on them.

PR c++/103341

gcc/cp/ChangeLog:

* decl.cc (cp_finish_decl): Pass the template arguments of a
variable template specialization or a templated static data
member to do_auto_deduction when the auto is constrained.

gcc/testsuite/ChangeLog:

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