Title
Passing short scoped enumerations to ellipsis
Status
open
Section
8.2.2 [expr.call]
Submitter
Mike Miller

Created on 2017-04-28.00:00:00, last changed 2017-04-28.00:00:00.

Messages

Date: 2017-04-28.00:00:00

According to 8.2.2 [expr.call] paragraph 9,

If the argument has integral or enumeration type that is subject to the integral promotions (7.6 [conv.prom]), or a floating-point type that is subject to the floating-point promotion (7.7 [conv.fpprom]), the value of the argument is converted to the promoted type before the call. These promotions are referred to as the default argument promotions.

A scoped enumeration with an underlying type that is shorter than int will not be widened when passed to an ellipsis. Should it be?

History
Date User Action Args
2017-04-28 00:00:00admincreate