]> git.ipfire.org Git - thirdparty/gcc.git/commit
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>
Tue, 12 Apr 2022 23:32:38 +0000 (19:32 -0400)
commit12b11107edfcde6a16ec397a9120687a14254215
tree73a95c1d7a9605d2e97d6772e7aa876583a6c691
parent1429db66619d2b801ac0b586b5eed74ab54a35b0
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.c (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.

(cherry picked from commit e272cf95ba048fde60b21aee046c9ca9c9264425)
gcc/cp/decl.c
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]