blob: dff59271a1e67fdf6485c28fc2ed713fdb896bd5 [file] [log] [blame]
// { dg-do compile { target c++20 } }
struct A
{
int i;
bool operator==(A a) const { return i == a.i; }
};
struct B
{
A a;
bool operator==(const B&) const = default; // { dg-error "A::operator==" "" { target { ! implicit_constexpr } } }
};
constexpr bool x = B() == B(); // { dg-error "non-.constexpr" "" { target { ! implicit_constexpr } } }