| 1 |
// { dg-do compile { target c++2a } } |
| 2 |
|
| 3 |
template<typename T> |
| 4 |
inline constexpr bool foo_v = false; |
| 5 |
|
| 6 |
template<typename T> |
| 7 |
concept foo = (bool)(foo_v<T> | foo_v<T&>); |
| 8 |
|
| 9 |
template<typename... Ts> |
| 10 |
requires (foo<Ts> && ...) // { dg-message "19:with Ts = .int, char... evaluated to .false." } |
| 11 |
void |
| 12 |
bar() |
| 13 |
{ } |
| 14 |
|
| 15 |
template<int> |
| 16 |
struct S { }; |
| 17 |
|
| 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 |
{ } |
| 23 |
|
| 24 |
void |
| 25 |
baz() |
| 26 |
{ |
| 27 |
bar<int, char>(); // { dg-error "no match" } |
| 28 |
baz<2,3,4>(); // { dg-error "no match" } |
| 29 |
} |