]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Add testcase for already-fixed PR [PR102643]
authorPatrick Palka <ppalka@redhat.com>
Mon, 11 Oct 2021 16:33:30 +0000 (12:33 -0400)
committerPatrick Palka <ppalka@redhat.com>
Mon, 11 Oct 2021 16:33:30 +0000 (12:33 -0400)
Fixed with r12-1744.

PR c++/102643

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/class-deduction-alias11.C: New test.

gcc/testsuite/g++.dg/cpp2a/class-deduction-alias11.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias11.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias11.C
new file mode 100644 (file)
index 0000000..87eb3e6
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/102643
+// { dg-do compile { target c++20 } }
+
+template<class _Tp, class>
+struct vector {
+  typedef int allocator_type;
+  vector(_Tp, allocator_type = allocator_type());
+};
+
+template<class T> using vector_mm = vector<T, int>;
+
+vector_mm v(0);