-
Notifications
You must be signed in to change notification settings - Fork 794
Description
For @jensmaurer: the version approved by CWG (pending review by LWG) contains in [expr.type.conv]/1
Otherwise, if the type is
auto
, it is replaced by the type deduced for the variablex
in the invented declaration ([dcl.spec.auto]), which is never interpreted as a function declaration:auto x init;
, where
init
is the initializer.
The appositive with the intervening relative clause and colon is a bit broken, as is the trailing comma. My preferred means of addressing this is to replace the whole sentence with
Otherwise, if the type is
auto
, it is replaced by the type determined by placeholder type deduction ([dcl.spec.auto.deduct]).
and add a bullet to [dcl.spec.auto.deduct]/2:
- for an explicit type conversion ([expr.type.conv]),
T
isauto
andE
is the initializer.
Using auto
explicitly rather than referring to "the specified type" avoids an ordering question with the replacement of that auto
with the deduced type.