On Sunday, 12 November 2017 at 18:46:54 UTC, Per Nordlöw wrote:
On Sunday, 12 November 2017 at 18:34:42 UTC, Eduard Staniloiu wrote:
On Saturday, 11 November 2017 at 14:26:34 UTC, Nordlöw wrote:
Have anybody used allocators to construct class instances?

I might be wrong, but I think you are looking for std.experimental.allocator.make [0]

[0] - https://dlang.org/phobos/std_experimental_allocator.html#make

Thanks!

In the example the classes are declared as static. What effect does this have here and is it required for classes allocated via make?

No, the classes and structs of the examples are simply declared as 'static' because they are located in a 'unittest' block. You can ignore the keyword...it just means that they are declared as if they would stand at the global scope.

Reply via email to