Created on2017-04-28.00:00:00 last changed62 months ago
Proposed resolution (October, 2019):
Change 7.6.1.3 [expr.call] paragraph 12 as follows:
...Passing a potentially-evaluated argument ofa scopedenumeration type or of a class type (Clause 11 [class]) having an eligible non-trivial copyconstructor, an eligible non-trivial move constructor, or anon-trivial destructor (11.4.4 [special]), withno corresponding parameter, is conditionally-supported withimplementation-defined semantics. If the argument...
Notes from the September, 2019 teleconference:
The consensus was that passing scoped enumerations to ellipsisshould be conditionally-supported behavior, similar to thetreatment of class types with nontrivial copy semantics.
Proposed resolution (May, 2019): [SUPERSEDED]
Change 7.6.1.3 [expr.call] paragraph 12 as follows:
...If the argument hasanintegral or enumeration type that issubject to the integral promotions(7.3.7 [conv.prom]),a scoped enumeration typewhose underlying type is subject to the integral promotions,or a floating-point type thatis subject to the floating-point promotion(7.3.8 [conv.fpprom]), the value of the argument isconverted to the promoted type before the call. Thesepromotions are referred to as thedefault argumentpromotions.
Notes from the June, 2018 meeting:
The consensus of CWG was that the value passed ougnt to be widenedto match the promoted type of the underlying type.
[Adopted as a DR at the November, 2019 meeting.]
According to 7.6.1.3 [expr.call] paragraph 9,
If the argument has integral or enumeration type that is subject to theintegral promotions (7.3.7 [conv.prom]), or a floating-point typethat is subject to the floating-point promotion (7.3.8 [conv.fpprom]),the value of the argument is converted to the promoted type before thecall. These promotions are referred to as the default argument promotions.
A scoped enumeration with an underlying type that is shorter thanint will not be widened when passed to an ellipsis. Should itbe?
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-12-15 00:00:00 | admin | set | messages: +msg6439 |
| 2020-12-15 00:00:00 | admin | set | messages: +msg6438 |
| 2020-12-15 00:00:00 | admin | set | messages: +msg6437 |
| 2020-12-15 00:00:00 | admin | set | messages: +msg6436 |
| 2020-12-15 00:00:00 | admin | set | status: open -> c++20 |
| 2017-04-28 00:00:00 | admin | create | |