Universal Construction Syntax for Pointers?

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 13 23:45:15 PDT 2014


On Saturday, 14 June 2014 at 06:39:56 UTC, Ali Çehreli wrote:
> On 06/13/2014 10:29 PM, Meta wrote:
>> I thought this was possible, but DMD 2.065 doesn't allow it, 
>> saying "no
>> constructor for int":
>>
>> int* p = new int(3);
>>
>> Is something like this planned for the future? I know we can 
>> already do:
>>
>> int n = int(3);
>
> Those both compile with 2.066
>
> Ali

Right, thanks. It's difficult to keep track of what's already 
released and what's in Git HEAD.


More information about the Digitalmars-d-learn mailing list