gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | // { dg-additional-options "-fconcepts" } |
| 3 | |
| 4 | template<typename F> |
| 5 | concept FCallable = |
| 6 | requires(F) |
| 7 | { |
| 8 | F::f(); |
| 9 | }; |
| 10 | |
| 11 | |
| 12 | class Test1 |
| 13 | { |
| 14 | public: |
| 15 | template<FCallable P, FCallable... Pp> |
| 16 | static void g() |
| 17 | { |
| 18 | (Pp::f(), ...); |
| 19 | } |
| 20 | }; |
| 21 | |
| 22 | class A |
| 23 | { |
| 24 | public: |
| 25 | static void f() {} |
| 26 | }; |
| 27 | |
| 28 | int main() |
| 29 | { |
| 30 | Test1::template g<A>(); |
| 31 | } |
| 32 |