On Sunday, July 15, 2012 18:34:44 bearophile wrote: > Alex Rønne Petersen: > > This is how you do it in modern D: > This seems fiddly and bug-prone (and eventually fit to go in the > D FAQ). > Maybe it needs to use an aligned_malloc, to avoid aligning > troubles in the class.
It'll probably become easier to do once we have allocators, since it'll probably become possible to do something like auto alloc = getMallocAllator(); auto obj = alloc.make!T(args1, args2, args3); - Jonathan M Davis