Jonathan Blow demo #2

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 22 17:18:34 PST 2014


On 12/12/14 2:47 AM, bearophile wrote:
>
>> OK, I think that it will be enough to add a Phobos function like this
>> (what's the right Phobos module to put it?) (why isn't this @trusted?)
>> (why isn't this returning a T*?):
>>
>>
>>> ref T uninitializedAlloc(T)() @system pure nothrow
>>> {
>>>    return *cast(T*)GC.malloc(T.sizeof);
>>> }
>
> https://issues.dlang.org/show_bug.cgi?id=13859
>
> Bye,
> bearophile

There should be a minimallyInitializedAlloc, too. -- Andrei


More information about the Digitalmars-d mailing list