diff --git a/dub.sdl b/dub.sdl index fb58c66a3..a9a81e404 100644 --- a/dub.sdl +++ b/dub.sdl @@ -36,8 +36,13 @@ subPackage { auto destFile = file.replace(srcDir, destDir); destFile.dirName.mkdirRecurse; file.readText.replace("std.experimental.allocator", "stdx.allocator") + .replace("std.conv", "stdx.allocator.conv") .toFile(destFile); } + pkgDir.buildPath("std", "conv.d") + .readText + .replace("std.conv", "stdx.allocator.conv") + .toFile(destDir.buildPath("conv.d")); '` } diff --git a/test/dub_stdx_allocator.d b/test/dub_stdx_allocator.d index 5ae47b9b9..bcd24b813 100755 --- a/test/dub_stdx_allocator.d +++ b/test/dub_stdx_allocator.d @@ -11,3 +11,16 @@ void main(string[] args) writeln("allocate: ", buf); scope(exit) Mallocator.instance.deallocate(buf); } + +void test() +{ + import stdx.allocator : make; + import stdx.allocator.mallocator : Mallocator; + alias alloc = Mallocator.instance; + struct Node + { + int x; + this(int, int){} + } + auto newNode = alloc.make!Node(2, 3); +}