]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed test [PR86933]
authorPatrick Palka <ppalka@redhat.com>
Fri, 14 Feb 2025 21:28:42 +0000 (16:28 -0500)
committerPatrick Palka <ppalka@redhat.com>
Fri, 14 Feb 2025 21:28:42 +0000 (16:28 -0500)
Fixed by the PR118265 fix r15-7339-g26d3424ca5d9f4.

PR c++/86933

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/variadic-nontype1.C: Mention PR number.
* g++.dg/cpp1z/variadic-nontype2.C: New test.

gcc/testsuite/g++.dg/cpp1z/variadic-nontype1.C
gcc/testsuite/g++.dg/cpp1z/variadic-nontype2.C [new file with mode: 0644]

index ad2af623b1397d19eba3fec2d59fdac9c2264578..594857a998417b55bb4b94364a8f86c72fbc47c3 100644 (file)
@@ -1,4 +1,6 @@
+// PR c++/118265
 // { dg-do compile { target c++17 } }
+
 struct Class1
 {
     void apply_bool(bool){}
diff --git a/gcc/testsuite/g++.dg/cpp1z/variadic-nontype2.C b/gcc/testsuite/g++.dg/cpp1z/variadic-nontype2.C
new file mode 100644 (file)
index 0000000..4c112ea
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/86933
+// { dg-do compile { target c++17 } }
+
+template <auto... Vs> struct TT;
+template <class T, class... Ms, Ms T::*... Ptrs> struct TT<Ptrs...> {};
+
+struct X {
+    int x;
+    double y;
+};
+
+TT<&X::x, &X::y> t;