ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git] / gcc / testsuite / g++.dg / concepts / pack-1.C
blobb4f2c36374d94ec3de345b1192c8caa3227443b1
1 // { dg-do compile { target c++17 } }
2 // { dg-options "-fconcepts" }
4 // distilled from <concepts>, via header units
6 template<typename _ArgTypes>
7 struct is_invocable;
9 template<typename... _Args>
10 concept invocable = is_invocable<_Args...>::value;
12 template<typename _Is>
13 requires invocable<_Is>
14 class BUG;
16 template<typename _Is>
17 requires invocable<_Is>
18 class BUG {}; // { dg-bogus "different constraints" }
20 template<int> struct is_invocable_NT;
22 template<int... Ints>
23 concept invocable_NT = is_invocable_NT<Ints...>::value;
25 template<int _Is>
26 requires invocable_NT<_Is>
27 class BUG_NT;
29 template<int _Is>
30 requires invocable_NT<_Is>
31 class BUG_NT {};