| 1 |
// { dg-do compile { target c++17 } } |
| 2 |
// { dg-options "-fconcepts" } |
| 3 |
|
| 4 |
template<class T> |
| 5 |
concept Addable = |
| 6 |
requires(T x){ |
| 7 |
{x + x} -> T; // { dg-error "return-type-requirement is not a type-constraint" } |
| 8 |
}; |
| 9 |
|
| 10 |
int main(){ |
| 11 |
Addable auto t = 0; |
| 12 |
} |