At
https://github.com/nordlow/justd/blob/master/containers_ex.d
I want to benchmark Economic Modelings container packages.
Specifically HashSet with different allocators.
But when I try to use `LocalAllocator` defined as
alias LocalAllocator = InSituRegion!(n, T.alignof);
at
https://github.com/nordlow/justd/blob/master/containers_ex.d#L59
in call to `hashSet`
auto hx = iota!T(0, n).hashSet; // TODO Use LocalAllocator
https://github.com/nordlow/justd/blob/master/containers_ex.d#L60
it errors as:
containers_ex.d(17,38): Error: constructor
containers.hashset.HashSet!(int, InSituRegion!(1048576LU, 4LU),
generateHash, false).HashSet.this is not callable because it is
annotated with @disable
/home/per/Work/justd/containers/hashset.d(366,20): Error: struct
std.experimental.allocator.building_blocks.region.InSituRegion!(1048576LU, 4LU).InSituRegion is not copyable because it is annotated with @disable
/home/per/opt/x86_64-unknown-linux-gnu/dlang/linux/bin64/src/phobos/std/conv.d(4096,13):
Error: static assert "Bucket cannot be emplaced from (InSituRegion!(1048576LU,
4LU))."
/home/per/opt/x86_64-unknown-linux-gnu/dlang/linux/bin64/src/phobos/std/conv.d(4161,18):
instantiated from here: emplaceImpl!(InSituRegion!(1048576LU, 4LU))
/home/per/Work/justd/containers/hashset.d(293,19):
instantiated from here: emplace!(Bucket, InSituRegion!(1048576LU,
4LU))
containers_ex.d(17,16): instantiated from here:
HashSet!(int, InSituRegion!(1048576LU, 4LU), generateHash, false)
containers_ex.d(60,31): instantiated from here:
hashSet!(InSituRegion!(1048576LU, 4LU), Result)
Comint exited abnormally with code 1 at Thu Oct 22 13:55:25
What's wrong?