import std.stdio;
interface IDuck { void quack(); } class Test(T) : IDuck { T data; alias data this; } struct Duck { void quack() { writeln("Quack"); } } void main() { Test!Duck d; }
Balagopal Komarath via Digitalmars-d-learn Wed, 14 Jun 2017 02:37:27 -0700
import std.stdio;
interface IDuck { void quack(); } class Test(T) : IDuck { T data; alias data this; } struct Duck { void quack() { writeln("Quack"); } } void main() { Test!Duck d; }