Re: heap allocate empty S with variadic ctor

2012-11-04 Thread Dan
On Sunday, 4 November 2012 at 19:30:49 UTC, Tobias Pankrath wrote: Sadly you have to cast, because typeof([]) is void[]. Alternatively you could define an constructor that takes void[] but insists of the argument being empty. Great explanation - thanks!

Re: heap allocate empty S with variadic ctor

2012-11-04 Thread Tobias Pankrath
On 04.11.2012 13:58, Dan wrote: This may be a manifestation of bug 1528. In the code below how can I heap allocate a default S? I can't seem to get a call to work. In general structs are stack objects, but is there any problem with using the heap to get one? No, you can get one, but op new ret

heap allocate empty S with variadic ctor

2012-11-04 Thread Dan
This may be a manifestation of bug 1528. In the code below how can I heap allocate a default S? I can't seem to get a call to work. In general structs are stack objects, but is there any problem with using the heap to get one? Thanks Dan -- import std.stdio;