Instantiating a class with different types at runtime

Marduk via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 28 23:05:19 PST 2016


On Sunday, 27 November 2016 at 20:57:28 UTC, Namespace wrote:
>
> class Example(L, R)
> {
>     L _left;
>     R _right;
>
>     this(L l, R r)
>     {
>         _left = l;
>         _right = r;
>     }
> }

That was fast! But I needed the second reply in order to 
understand yours. Thanks anyway.


More information about the Digitalmars-d-learn mailing list