shez wrote:
Can you give an example? The C++ language is not supposed to be
ambiguous.
There is an ambituity in the C++ GRAMMAR between declarations
and expressions at times. The language itself is NOT ambiguous.
The grammar ambiguity is resolved by semantically assuming any
ambiguous constuct is a declaration.
An example:
T foo(int(x));
is the "int(x)" an expression (a conversion of x to int) that is the
initializer of the foo object or is it a declaration of a function argument
called x making the whole thing a function declaration.
The language semantic rules resolve it to a declaration.