On Sunday, 29 May 2016 at 11:16:57 UTC, Dicebot wrote:
On 05/28/2016 09:58 PM, Iakh wrote:
Yeah. It doesn't capture any context. But once it does it
would be an error.
Custom allocators are not very suitable for things like
closures because of undefined lifetime. Even if it was allowed
to replace allocator, you would be limited to either GC or RC
based one anyway to keep things @safe.
Yes. It's better to pass something like memory management strategy
instead of just allocator like rc ptr or uniquePtr