Il 02/02/2012 23:27, Richard Smith ha scritto:
> 
> 
> Yes, absolutely. As in my original example:
> 
>    enum E { n = 2 };
>    E e = (E)5;
> 
> Here, I think that (E)5 is not a constant expression, but (E)3 is.
> Possibly we're in violent agreement about that?

My reading of the standard confirms that: the value of (E)5 is defined
"unspecified" and there is no warranty that (int)(E)5 is equal to 5.

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

Reply via email to