Allocation failures

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 16 17:09:20 PST 2016


On Wednesday, 17 February 2016 at 00:45:35 UTC, Chris Wright 
wrote:
> http://dpldocs.info/search/search?searchTerm=emplace to create 
> an exception object in manually allocated memory.

Aye, this overload: 
http://dpldocs.info/experimental-docs/std.conv.emplace.3.html

though the example there is awful, wtf is it even trying to show?


But anyway, you can also throw a static object. That's actually 
what outOfMemoryError does 
<http://dpldocs.info/experimental-docs/core.exception.onOutOfMemoryError.html> - it throws a statically allocated object.


More information about the Digitalmars-d mailing list