]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: variadic ttp constraint subsumption [PR99904]
authorPatrick Palka <ppalka@redhat.com>
Thu, 7 Oct 2021 14:02:54 +0000 (10:02 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 7 Oct 2021 14:02:54 +0000 (10:02 -0400)
commit2e6e0d86a06389056d0e7fecc99c547420ad787a
tree135d1870a5006339b21054e2fcec4ed1d5d3a0c1
parent9b239d05ffd5a17ede44abd55bc6622c6e279868
c++: variadic ttp constraint subsumption [PR99904]

Here we're crashing when level-lowering the variadic constraint C<Ts...>
on the template template parameter TT because tsubst_pack_expansion expects
processing_template_decl to be set during a partial substitution.

PR c++/99904

gcc/cp/ChangeLog:

* pt.c (is_compatible_template_arg): Set processing_template_decl
around tsubst_constraint_info.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-ttp4.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/concepts-ttp4.C [new file with mode: 0644]