On Fri, 25 Feb 2011 14:51:18 -0500, Andrej Mitrovic <[email protected]> wrote:

On 2/25/11, Steven Schveighoffer <[email protected]> wrote:
a dirty trick you could do is add 0, which should promote the arg to int.

Cool. I've almost used +1-1, LOL!

Well, I thought DMD would simply ignore +0 (dead code elimination?),
but apparently this is a cool shorthand for casting literals? Nice.

No code is generated to add 0, but it does affect the type.

-Steve

Reply via email to