]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Add testcase for DR 2874
authorJakub Jelinek <jakub@redhat.com>
Wed, 25 Sep 2024 14:08:33 +0000 (16:08 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 25 Sep 2024 14:26:36 +0000 (16:26 +0200)
Seems we already allow the partial specializations the way the DR clarifies,
so this patch just adds a testcase which verifies that.

2024-09-25  Jakub Jelinek  <jakub@redhat.com>

* g++.dg/DRs/dr2874.C: New test.

gcc/testsuite/g++.dg/DRs/dr2874.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/DRs/dr2874.C b/gcc/testsuite/g++.dg/DRs/dr2874.C
new file mode 100644 (file)
index 0000000..1098129
--- /dev/null
@@ -0,0 +1,13 @@
+// DR 2874 - Qualified declarations of partial specializations
+// { dg-do compile { target c++11 } }
+
+namespace N {
+  template <typename T>
+  struct A;
+}
+
+template <>
+struct N::A <int>;
+
+template <typename T>
+struct N::A <T *>;