On Wednesday, 4 September 2013 at 21:14:26 UTC, Ali Çehreli wrote:
On 09/04/2013 01:46 PM, Adam D. Ruppe wrote:
> D does not support implicit struct construction.
That's what I knew.
> Interestingly though, it *does* support it for functions
taking classes:
>
> class Foo {
> this(int i) {}
> }
>
> void foo(Foo f...) {}
>
> void main() {
> foo(10);
> }
WHAT? :) It even new's one?
But it works only for the ellipsis.
I wonder why the discrepancy...
Ali
http://dlang.org/function.html Under Typesafe Variadic Functions
-> For class objects.