2011-11-05から1日間の記事一覧
import std.traits; interface I { I clone(); } class C : I { override C clone() // I.clone() の共変オーバーライド { return new C; } } void main() { { static assert(isCovariantWith!(typeof(C.clone), typeof(I.clone))); }{ C function() derived…