blob: fb62ecbfdb5ef38930e76ea25f55c3961a559c29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// { 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 } && c++20_down } } }
};
constexpr bool x = B() == B(); // { dg-error "non-.constexpr" "" { target { ! implicit_constexpr } } }
|