Title
Ambiguity resolution for (T())*x
Status
nad
Section
9.3.3 [dcl.ambig.res]
Submitter
Richard Smith

Created on 2014-07-15.00:00:00 last changed 121 months ago

Messages

Date: 2014-11-15.00:00:00

Rationale (November, 2014):

According to 9.3.3 [dcl.ambig.res], T() is to be taken as a function type, so the cast interpretation is correct, and one of the examples in this section is very nearly exactly this case.

Date: 2022-11-20.07:54:16

The disambiguation of a fragment like

  (T())*x

where T is a type and x is a variable, is unclear. Is it a cast to type T() of the expression *x, or is it a binary operator * multiplying a value-initialized T by x? Current implementations treat it as the former, which is not helpful since the specified type is a function type and thus always ill-formed.

History
Date User Action Args
2014-11-24 00:00:00adminsetmessages: + msg5282
2014-07-15 00:00:00admincreate