]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed test [PR109095]
authorMarek Polacek <polacek@redhat.com>
Tue, 3 Sep 2024 17:32:35 +0000 (13:32 -0400)
committerMarek Polacek <polacek@redhat.com>
Tue, 3 Sep 2024 17:32:53 +0000 (13:32 -0400)
Fixed by r13-6693.

PR c++/109095

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/nontype-class66.C: New test.

gcc/testsuite/g++.dg/cpp2a/nontype-class66.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class66.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class66.C
new file mode 100644 (file)
index 0000000..385b290
--- /dev/null
@@ -0,0 +1,19 @@
+// PR c++/109095
+// { dg-do compile { target c++20 } }
+
+template< typename T >
+struct bar
+{};
+
+template< int X >
+struct baz
+{};
+
+template< auto N, template< auto N2 > typename TT >
+struct foo;
+
+template< typename T, bar< T > B, template< T N2 > typename TT >
+struct foo< B, TT >
+{};
+
+foo< bar< int >{}, baz > x;