comparison gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // { dg-do compile { target c++2a } }
2 // { dg-additional-options "-fconcepts-ts" }
3
4 template<typename F>
5 concept bool FCallable()
6 {
7 return requires(F)
8 {
9 F::f();
10 };
11 }
12
13 class Test1
14 {
15 public:
16 template<FCallable P, FCallable... Pp>
17 static void g()
18 {
19 (Pp::f(), ...);
20 }
21 };
22
23 class A
24 {
25 public:
26 static void f() {}
27 };
28
29 int main()
30 {
31 Test1::template g<A>();
32 }
33