Semantics of ^^

Don nospam at nospam.com
Wed Dec 9 05:48:02 PST 2009


Jason House wrote:
> I think you have a bad corner case:
> 
> enum int ct = -1;
> immutable rt = -1;
> 
> ct ^^ ct // Error (compile time)
> rt ^^ ct // Error (compile time)
> rt ^^ rt // Error (run time)
> ct ^^ rt // Works??? (after rewrite)

No, they will all work. Both rt and ct are manifest constants.



More information about the Digitalmars-d mailing list