[D语言] DMD 0.168发布

新特性: 一、给委托增长ptr属性,指向委托所绑定的对象。 这是一个语法糖,dg.ptr被转化为cast(void*)dg,它只能做右值,因此除了能读取它之外,在语法上禁止对它赋值。要想把委托绑定到不一样的对象,你只能本身实现: class  Foo{      int  foo; public :      this ( int  foo){          this .foo  =  foo
相关文章
相关标签/搜索