Awesome. I only found out that `auto intptr = new int(4)` didn't
work as expected about 30min ago!
Atila
On Thursday, 27 March 2014 at 06:11:01 UTC, Jonathan M Davis
wrote:
On Friday, March 07, 2014 12:41:23 Andrej Mitrovic wrote:
https://github.com/D-Programming-Language/dmd/pull/1356 was
recently
merged (pull by Kenji), implementing this enhancement:
https://d.puremagic.com/issues/show_bug.cgi?id=9112
Example code:
-----
int n = int(1);
int *p = new int(1);
assert(*p == 1);
-----
I'm just curious what people think about the new feature.
Discuss!
I've pushed for this for ages. Pointers to built-in types are
seriously
hampered without it, and it helps generic code considerably to
have it. It was
one of those things that I was shocked to find out didn't work
from the get-
go.
- Jonathan M Davis