Hello,Is it possible to create scope wrapper initialized by non default constructor with scope parameter?
something like this:
struct Wrapper{ int* p; static Wrapper create(scope return int* p)@safe{ Wrapper w; w.p = p; return w; } /++ This doesn't work: this(scope return int* p)@safe scope{ this.p = p; }+/ } void main()@safe{ scope int i; scope Wrapper w1 = Wrapper.create(&i); scope Wrapper w2 = Wrapper(&i); }