c++: Add testcase for PR c++/93207
authorPatrick Palka <ppalka@redhat.com>
Tue, 14 Apr 2020 19:02:22 +0000 (15:02 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 14 Apr 2020 19:02:22 +0000 (15:02 -0400)
gcc/testsuite/ChangeLog:

PR c++/93207
* g++.dg/concepts/variadic5.C: New test.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/variadic5.C [new file with mode: 0644]

index cb4b23c0b76aeb8bf60e038ee80b1c0709e49165..c663b25e13c5ad7038ed0db97f090ee714216578 100644 (file)
@@ -1,5 +1,8 @@
 2020-04-14  Patrick Palka  <ppalka@redhat.com>
 
+       PR c++/93207
+       * g++.dg/concepts/variadic5.C: New test.
+
        PR c++/85278
        * g++.dg/concepts/diagnostic9.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/concepts/variadic5.C b/gcc/testsuite/g++.dg/concepts/variadic5.C
new file mode 100644 (file)
index 0000000..a871079
--- /dev/null
@@ -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>();
+}