Re: how to call class' template constructor

2014-10-13 Thread ketmar via Digitalmars-d-learn
On Sun, 12 Oct 2014 21:30:44 -0400 Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: At least someone else has found a similar issue before: https://issues.dlang.org/show_bug.cgi?id=10689 hm. i somehow missed this in my searches. thanks. I'm not sure what

how to call class' template constructor

2014-10-12 Thread ketmar via Digitalmars-d-learn
Hello. please, how to call template constructor of a class? it's completely escaped my mind. i.e. i have this class: class A { this(alias ent) (string name) { ... } } and i want to do: void foo () { ... } auto a = new A!foo(xFn); yet compiler tells me that template

Re: how to call class' template constructor

2014-10-12 Thread JR via Digitalmars-d-learn
On Sunday, 12 October 2014 at 19:46:41 UTC, ketmar via Digitalmars-d-learn wrote: Hello. please, how to call template constructor of a class? it's completely escaped my mind. i.e. i have this class: class A { this(alias ent) (string name) { ... } } and i want to do:

Re: how to call class' template constructor

2014-10-12 Thread Cliff via Digitalmars-d-learn
On Sunday, 12 October 2014 at 19:46:41 UTC, ketmar via Digitalmars-d-learn wrote: Hello. please, how to call template constructor of a class? it's completely escaped my mind. i.e. i have this class: class A { this(alias ent) (string name) { ... } } and i want to do:

Re: how to call class' template constructor

2014-10-12 Thread anonymous via Digitalmars-d-learn
On Sunday, 12 October 2014 at 19:46:41 UTC, ketmar via Digitalmars-d-learn wrote: Hello. please, how to call template constructor of a class? it's completely escaped my mind. i.e. i have this class: class A { this(alias ent) (string name) { ... } } and i want to do:

Re: how to call class' template constructor

2014-10-12 Thread ketmar via Digitalmars-d-learn
On Sun, 12 Oct 2014 20:29:39 + JR via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Template the whole class? class A(alias ent)? no, that will produce different classes for different types, and i need just one class, but initialized with different entities. with templated

Re: how to call class' template constructor

2014-10-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/12/14 3:46 PM, ketmar via Digitalmars-d-learn wrote: Hello. please, how to call template constructor of a class? it's completely escaped my mind. i.e. i have this class: class A { this(alias ent) (string name) { ... } } and i want to do: void foo () { ... }