You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 variable x 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 is auto and E 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.
The text was updated successfully, but these errors were encountered:
jensmaurer
changed the title
Awkward invented declaration in P0849
[expr.type.conv] Awkward invented declaration in P0849
Oct 15, 2021
For @jensmaurer: the version approved by CWG (pending review by LWG) contains in [expr.type.conv]/1
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
and add a bullet to [dcl.spec.auto.deduct]/2:
Using
auto
explicitly rather than referring to "the specified type" avoids an ordering question with the replacement of thatauto
with the deduced type.The text was updated successfully, but these errors were encountered: