Summary: ref returns not allowed in complex template
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

import std.typecons;

struct Proxy(R...)
    Tuple!(int*, float*) ptrs;
    // enable!(ct_constant)
    ref R[i] at(int i)();

void main()
    Proxy!(int, float) p;
    auto x =!(1);

fails to compile with the error message:

variable test.Proxy!(int,float).Proxy.i only parameters or foreach declarations
can be ref


Reply via email to