Message ID | 20200414190409.1528960-1-ppalka@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] c++: Add testcase for PR c++/93207 | expand |
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>(); +}