Created on 2023-04-11.00:00:00 last changed 11 months ago
Proposed resolution (approved by CWG 2023-04-28):
Change in 11.4.8.3 [class.conv.fct] paragraph 4 as follows:
[ Note: A conversion function is neverused to convertinvoked for implicit or explicit conversions of ana (possibly cv-qualified)object to the(possibly cv-qualified)same object type (or a reference to it), to a(possibly cv-qualified)base class of that type (or a reference to it), or to cv void.[ Footnote:These conversions are considered as standard conversions for the purposes of overload resolution (12.2.4.2 [over.best.ics], 12.2.4.2.5 [over.ics.ref]) and therefore initialization (9.4 [dcl.init]) and explicit casts (7.6.1.9 [expr.static.cast]). A conversion to void does not invoke any conversion function (7.6.1.9 [expr.static.cast]).Even though never directly called to perform a conversion, such conversion functions can be declared and can potentially be reached through a call to a virtual conversion function in a base class.-- end footnote ]-- end note ][ Example: ... ]
[Accepted as a DR at the June, 2023 meeting.]
The rule in 11.4.8.3 [class.conv.fct] paragraph 4 is normatively redundant explanation:
A conversion function is never used to convert a (possibly cv-qualified) object to the (possibly cv-qualified) same object type (or a reference to it), to a (possibly cv-qualified) base class of that type (or a reference to it), or to cv void. [ Footnote: These conversions are considered as standard conversions for the purposes of overload resolution (12.2.4.2 [over.best.ics], 12.2.4.2.5 [over.ics.ref]) and therefore initialization (9.4 [dcl.init]) and explicit casts (7.6.1.9 [expr.static.cast]). A conversion to void does not invoke any conversion function (7.6.1.9 [expr.static.cast]). Even though never directly called to perform a conversion, such conversion functions can be declared and can potentially be reached through a call to a virtual conversion function in a base class. -- end footnote ]
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-12-19 10:15:28 | admin | set | status: dr -> drwp |
2023-07-16 13:00:43 | admin | set | status: ready -> dr |
2023-04-28 19:41:23 | admin | set | status: open -> ready |
2023-04-11 19:11:32 | admin | set | messages: + msg7249 |
2023-04-11 00:00:00 | admin | create |