memory management and the standard library
Jacob Carlborg
doob at me.com
Sun Mar 17 09:48:48 UTC 2019
On 2019-03-16 22:17, Olivier FAURE wrote:
> 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.
With my idea that would be the second layer, sitting on top of the more
general layer.
I guess a parameter with a default value could work:
void foobar(Allocator)(int x, int y, int z, Allocator allocator =
defaultGcAllocator);
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list