]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed test [PR66519]
authorMarek Polacek <polacek@redhat.com>
Fri, 14 Feb 2025 18:14:01 +0000 (13:14 -0500)
committerMarek Polacek <polacek@redhat.com>
Fri, 14 Feb 2025 18:14:24 +0000 (13:14 -0500)
Fixed by r10-6464.

PR c++/66519

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/variadic-parm2.C: New test.

gcc/testsuite/g++.dg/cpp0x/variadic-parm2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-parm2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-parm2.C
new file mode 100644 (file)
index 0000000..b061adb
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/66519
+// { dg-do compile { target c++11 } }
+
+template<typename F, typename... Tp>
+void a(F f, Tp... args, decltype(f(args...)) = 1) {}
+
+template<typename F, typename... Tp>
+void a(F, Tp...) {}
+
+void b(void) {
+    a([]{});
+}