diff mbox series

[committed] c++: Add testcase for PR c++/93207

Message ID 20200414190409.1528960-1-ppalka@redhat.com
State New
Headers show
Series [committed] c++: Add testcase for PR c++/93207 | expand

Commit Message

Patrick Palka April 14, 2020, 7:04 p.m. UTC
gcc/testsuite/ChangeLog:

	PR c++/93207
	* g++.dg/concepts/variadic5.C: New test.
---
 gcc/testsuite/g++.dg/concepts/variadic5.C | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/concepts/variadic5.C
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/concepts/variadic5.C b/gcc/testsuite/g++.dg/concepts/variadic5.C
new file mode 100644
index 00000000000..a871079e5de
--- /dev/null
+++ b/gcc/testsuite/g++.dg/concepts/variadic5.C
@@ -0,0 +1,26 @@ 
+// PR c++/93207
+// { dg-do compile { target concepts } }
+
+template <typename... Args>
+concept C = true;
+
+struct S
+{
+    template <typename... Args>
+    void f()
+    requires C<Args...>;
+};
+
+template <typename... Args>
+void S::f()
+requires C<Args...>
+{
+}
+
+void foo()
+{
+  S s;
+  s.f<>();
+  s.f<int>();
+  s.f<int, char>();
+}