How do I initialize a templated constructor?
rempas
rempas at tutanota.com
Mon Aug 8 12:25:22 UTC 2022
On Monday, 8 August 2022 at 08:27:49 UTC, bauss wrote:
>
> Yeah I think the only template argument you can have for
> constructors are `this` which will refer to things like the
> class that inherited the current class etc. not sure what else,
> but you can't really pass anything to it yourself unfortunately.
>
It's fine, thanks for trying in any case!
> But I think if you end up with something where you need
> different constructors with different type arguments then
> you're probably designing your program in a "wrong" way to
> begin with.
>
Oh, trust me! I didn't designed my program wrong in my case.
At least not the way I see it!
More information about the Digitalmars-d-learn
mailing list