blob: 490726de56f13f35e840955aed8430468a08273b [file] [log] [blame]
// { dg-do compile { target c++2a } }
struct A {
bool operator==(const A&) const;
};
struct D
{
A i;
bool operator==(const D& x) const = default; // { dg-error "A::operator==" }
bool operator!=(const D& z) const = default; // { dg-error "D::operator==" }
};
constexpr D d{A()};
static_assert (d == d); // { dg-error "non-constant|constexpr" }
static_assert (!(d != d)); // { dg-error "non-constant|constexpr" }