struct X {
X();
X& operator=(X&);
};
const X cx;
X x;
void f() {
x = cx; // error: X::operator=(X&) cannot assign cx into x
}X& X::operator=(const X&)
X& X::operator=(X&)
struct S {
int a;
S& operator=(const S&) = default;
};will not have a default move assignment operator implicitly declared because the
copy assignment operator has been user-declared.
struct S {
int a;
S& operator=(const S&) = default;
S& operator=(S&&) = default;
};X& X::operator=(X&&);