| 1 |
// { dg-do compile { target c++20 } } |
| 2 |
|
| 3 |
// FIXME: Diagnostics should be better. |
| 4 |
|
| 5 |
struct Base { |
| 6 |
template<typename T> |
| 7 |
static concept D = __is_same_as(T, int); // { dg-error "static data member" } |
| 8 |
|
| 9 |
template<typename T, typename U> |
| 10 |
static concept E = __is_same_as(T, U); // { dg-error "static data member" } |
| 11 |
|
| 12 |
template<typename T> |
| 13 |
concept C1 = __is_same_as(T, int); // { dg-error "not in namespace scope" } |
| 14 |
}; |
| 15 |
|
| 16 |
union U { |
| 17 |
template<typename T> |
| 18 |
concept C = true; // // { dg-error "not in namespace scope" } |
| 19 |
}; |
| 20 |
|
| 21 |
// { dg-excess-errors "deprecated" } |