This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
Consider:
struct S { auto & operator=(this S &, S&&); auto & operator=(this S &, const S&); };
The rule in 11.4.4 [special] paragraph 5 does not treat explicit-object member functions correctly:
Two special member functions are of the same kind if:
- they are both default constructors,
- they are both copy or move constructors with the same first parameter type, or
- they are both copy or move assignment operators with the same first parameter type and the same cv-qualifiers and ref-qualifier, if any.
Possible resolution:
Change in 11.4.4 [special] paragraph 5 as follows:
Two special member functions are of the same kind if:
- they are both default constructors,
- they are both copy or move constructors with the same first parameter type, or
- they are both copy or move assignment operators with the same first non-object parameter type
and, the samecv-qualifiersobject parameter type, and either both are implicit object member functions with no ref-qualifier,if anyor neither of them is.