2008-03-07から1日間の記事一覧
D言語の新バージョンで遊んでみた。 struct S{} struct T{~this(){}} struct U{this(this){}} struct V{V opAssign(V x){return*this;} ~this(){}} void main(){ S a;a=a=a;//OK T b;b=b=b;//NG U c;c=c=c;//NG V d;d=d=d;//OK } ~this()かthis(this)が定義…
D言語の新バージョンで遊んでみた。 struct S{} struct T{~this(){}} struct U{this(this){}} struct V{V opAssign(V x){return*this;} ~this(){}} void main(){ S a;a=a=a;//OK T b;b=b=b;//NG U c;c=c=c;//NG V d;d=d=d;//OK } ~this()かthis(this)が定義…