ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git] / gcc / testsuite / g++.dg / concepts / diagnostic3.C
blob52b2f23c95e5382957b59980cf6d5055793f4a97
1 // { dg-do compile { target c++2a } }
3 template<typename T>
4   inline constexpr bool foo_v = false;
6 template<typename T>
7   concept foo = (bool)(foo_v<T> | foo_v<T&>);
9 template<typename... Ts>
10 requires (foo<Ts> && ...) // { dg-message "19:with Ts = .int, char... evaluated to .false." }
11 void
12 bar()
13 { }
15 template<int>
16 struct S { };
18 template<int... Is>
19 requires (foo<S<Is>> && ...) // { dg-message "22:with Is = .2, 3, 4... evaluated to .false." }
20 void
21 baz()
22 { }
24 void
25 baz()
27   bar<int, char>(); // { dg-error "no match" }
28   baz<2,3,4>(); // { dg-error "no match" }