Created on 2022-11-03.00:00:00 last changed 17 months ago
[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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-07-16 13:00:43 | admin | set | status: open -> c++23 |
2023-07-16 13:00:43 | admin | set | status: drwp -> open |
2023-02-18 18:43:04 | admin | set | status: dr -> drwp |
2022-11-25 05:14:04 | admin | set | status: nb -> dr |
2022-11-08 07:26:56 | admin | set | status: open -> nb |
2022-11-08 07:26:56 | admin | set | status: open -> open |
2022-11-08 07:26:56 | admin | set | status: open -> open |
2022-11-08 07:26:56 | admin | set | status: open -> open |
2022-11-07 22:52:50 | admin | set | status: nb -> open |
2022-11-07 22:52:50 | admin | set | status: nb -> nb |
2022-11-07 22:52:50 | admin | set | status: nb -> nb |
2022-11-03 00:00:00 | admin | create |