www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20705] New: `-preview=rvaluerefparam` does not work with


          Issue ID: 20705
           Summary: `-preview=rvaluerefparam` does not work with template
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: industry
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: pro.mathias.lang gmail.com

Marking as blocker because this is just bad:
struct Foo
    int a;

void bar (T) (const ref T arg) {}

void main ()

DMD 2.091:
dmd -preview=rvaluerefparam autoref.d
autoref.d(10): Error: template autoref.bar cannot deduce function from argument
types !()(Foo), candidates are:
autoref.d(6):        bar(T)(ref const T arg)

Mar 29 2020