blob: 6aa9d9617791b0ff54c84521cffa055365ed5ebf [file] [log] [blame]
// { dg-do compile { target c++2a } }
template<typename T>
concept Eq = requires(T t) { t == t; }; // { dg-message "in requirements" }
template<Eq T> struct Foo { };
template<typename T>
struct S { // { dg-error "constraint failure" }
template<Eq U> friend class Bar;
friend class Foo<T>;
};
struct X { };
int main() {
S<int> si; // OK
S<X> sx;
}