memory management and the standard library

Johannes Pfau nospam at example.com
Sun Mar 17 11:27:21 UTC 2019


Am Sat, 16 Mar 2019 21:17:02 +0000 schrieb Olivier FAURE:
> 
> However, for that to work, you'd probably need a way to pass implicit
> arguments to a function without having to specify
> `foobar(defaultGcAllocator, x, y, z)` every time you call a function.

You can implement that using TLS globals, I think this is what 
std.experimental.allocators theAllocator is supposed to do. Of course 
you're limited in typing, you can't use templates there.

-- 
Johannes


More information about the Digitalmars-d mailing list