dmd 2.063 released with 260 bugfixes and enhancements

Mafi mafi at example.org
Thu May 30 11:00:24 PDT 2013


What a great release! Great work!

I really like the new langugage changes. One change caught my 
attention: #10 "The Template This Parameter now changes the 
member function qualifier". Does this mean that const/immutable 
ranges can implement a useful opSlice? Like

struct MyRange!T {
   T[] data;

   MyRange!(ElementType!data) opSlice(this T)() {
     return MyRange(data);
   }
}

So that given the other range primitves this will work:

const myConstRange = MyRange([5, 6, 7, 8]);
foreach(x; myConstRange) {}

Could this be made work with 2.063?

Mafi


More information about the Digitalmars-d-announce mailing list