On 10/12/2010 08:45 AM, Daniel Wallin wrote:
> int() is a integral constant expression and the above code is well
> formed in C++98, and I think it's meant to be in C++0x as well. There
> isn't really an ambiguity here because base-type must be an integral
> type, which of course X() can never satisfy. If we treat everything as
> a type-id the case Doug gave above is ill formed.
>

According to 8.2/2, "... any construct that could possibly be a type-id 
in its syntatic context, shall be considered a type-id." This rule 
applies even when the result is ill-formed, such as with sizeof(int()).

Sean
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to