Trying to make FreeList Allocator example compile
Per Nordlöw
per.nordlow at gmail.com
Mon Oct 8 21:50:33 UTC 2018
I'm trying to compile the example
import std.experimental.allocator.building_blocks.free_list :
FreeList;
theAllocator = allocatorObject(FreeList!8());
at https://dlang.org/phobos/std_experimental_allocator.html but
fails first because of missing import
import std.experimental.allocator : allocatorObject,
theAllocator;
and then, when adding this import, it fails again with the error
/home/per/Work/knet/phobos-next/snippets/gctester.d(127,40):
Error: template instance `FreeList!8` does not match template
declaration `FreeList(ParentAllocator, ulong minSize, ulong
maxSize = minSize, Flag adaptive = No.adaptive)`
Why is this example missing the `ParentAllocator` template
parameter and what is the preferred type for `ParentAllocator`?
More information about the Digitalmars-d-learn
mailing list