The current status of D?

Mehrdad wfunction at hotmail.com
Fri Dec 2 08:13:37 PST 2011


Actually, regarding my "little problem", why does this given an 
error/what's the proper way to fix it?

     class C(T) { inout this(inout(T)) { } }
     C!T slice(T)(auto ref T c) { return new C!T(c); }
     void main() { [1, 2, 3, 4, 5].slice(); }

     //Test.d(2): Error: cannot implicitly convert expression (new 
C(items)) of type inout(C) to Test.C!(int[]).C


More information about the Digitalmars-d mailing list