This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 111. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Accepted as a DR at the November, 2022 meeting.]
The exposition in terms of F1 and F2 as well as T1 and T2 is confusing.
Change in 9.5.2 [dcl.fct.def.default] paragraph 2 as follows:
An explicitly defaulted special member function F1
with type T1is allowed to differ from the corresponding special member function F2 with type T2that would have been implicitly declared, as follows:
T1and T2may have differing ref-qualifier s;
- if F2 has an implicit object parameter of type “reference to C”, F1 may be an explicit object member function whose explicit object parameter is of type “reference to C”, in which case
T1would differ from T2in that T1has an additional parameter;
T1and T2may have differing exception specifications; and
- if F2 has a non-object parameter of type const C&, the corresponding non-object parameter of F1 may be of type C&.
T1differs from T2in a way other than as allowed by the preceding rules, then:
- if F1 is an assignment operator, and the return type of
T1differs from the return type of T2or F1 's non-object parameter type is not a reference, the program is ill-formed;
- otherwise, if F1 is explicitly defaulted on its first declaration, it is defined as deleted;
- otherwise, the program is ill-formed.