https://issues.dlang.org/show_bug.cgi?id=19783 --- Comment #2 from Tomáš Chaloupka <chalucha at gmail.com> --- For the record, this works (uses different template): auto pf = (cast(Foo*)malloc(Foo.sizeof)).emplace!Foo(42); --