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
[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.
Possible resolution:
Change in 9.5.2 [dcl.fct.def.default] paragraph 2 as follows:
An explicitly defaulted special member function F1with type T1is allowed to differ from the corresponding special member function F2with type T2that would have been implicitly declared, as follows:If
T1F1 andT2F2 may 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
T1the type of F1 would differ fromT2the type of F2 in thatT1the type of F1 has an additional parameter;T1F1 andT2F2 may 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&.
T1the type of F1 differs fromT2the type of F2 in a way other than as allowed by the preceding rules, then:
- if F1 is an assignment operator, and the return type of
T1F1 differs from the return type ofT2F2 or 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.