std.experimental.allocator.make should throw on out-of-memory

Minas Mina via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 20 12:18:58 PDT 2016


On Tuesday, 19 April 2016 at 22:28:27 UTC, Alex Parrill wrote:
> I'm proposing that std.experimental.allocator.make, as well as 
> its friends, throw an exception when the allocator cannot 
> satisfy a request instead of returning null.
>
> [...]

I believe it was designed this way so that it can be used in 
@nogc code, although I might be wrong.


More information about the Digitalmars-d mailing list