www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17803] New: std.typecons.Tuple: opAssign should return ref

https://issues.dlang.org/show_bug.cgi?id=17803

          Issue ID: 17803
           Summary: std.typecons.Tuple: opAssign should return ref Tuple
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: simen.kjaras gmail.com

As pointed out in issue 8494, this kind of code doesn't compile:

    Tuple!int a;
    return a = tuple(3);

The fix is two lines in std.typecons, and is fixed in this PR:
https://github.com/dlang/phobos/pull/5713.

--
Sep 03 2017