]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: P2308, Template parameter initialization (tests) [PR113800]
authorMarek Polacek <polacek@redhat.com>
Wed, 12 Feb 2025 18:33:37 +0000 (13:33 -0500)
committerMarek Polacek <polacek@redhat.com>
Thu, 13 Feb 2025 13:56:14 +0000 (08:56 -0500)
commit84f19ecb01958fa791b9213dbd80331474fca9f0
tree80cb5644a8be3129359338852131a0badfd79012
parent7738c6286fba7ec2112823f53cc2cefac2c8d007
c++: P2308, Template parameter initialization (tests) [PR113800]

This proposal was implemented a long time ago by my r9-5271,
but it took me this long to verify that it still works as per P2308.

This patch adds assorted tests, both from clang and from [temp.arg.nontype].
Fortunately I did not discover any issues in the compiler.

PR c++/113800
DR 2450

gcc/testsuite/ChangeLog:

* g++.dg/cpp26/pack-indexing15.C: New test.
* g++.dg/cpp2a/nontype-class68.C: New test.
* g++.dg/cpp2a/nontype-class69.C: New test.
* g++.dg/cpp2a/nontype-class70.C: New test.
* g++.dg/cpp2a/nontype-class71.C: New test.
* g++.dg/cpp2a/nontype-class72.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/testsuite/g++.dg/cpp26/pack-indexing15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class68.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class69.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class70.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class71.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/nontype-class72.C [new file with mode: 0644]