blob: 2d16d053e52198dd2d43a8a982300174869961c3 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// { dg-do compile { target c++20 } }
// { dg-additional-options "-fconcepts" }
template<typename X, typename Y = X>
concept HasBinaryAdd = requires(X x, Y y)
{
{x + y} -> decltype(x + y); // { dg-error "return-type-requirement is not a type-constraint" }
};
void proc(HasBinaryAdd auto x, HasBinaryAdd auto y);
|