This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112c. See for the official list.


1970. Ambiguity resolution for (T())*x

Section: 9.3.3  [dcl.ambig.res]     Status: NAD     Submitter: Richard Smith     Date: 2014-07-15

The disambiguation of a fragment like


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.

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.