On 3/27/22 22:32, vit wrote:
> int* getX(T)(return auto ref T t)
> if(is(T == class) || (is(T == struct) && __traits(isRef, t))){
> return &t.x;
> }I also think 'return' parameter is needed but I could not come up with an example where that 'return' provides any more safety. Compiler already warns without it. (I tried with and without -preview=dip1000 -preview=dip25).
Ali
