[Issue 17803] New: std.typecons.Tuple: opAssign should return ref Tuple

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Sep 4 05:57:51 UTC 2017


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 at puremagic.com
          Reporter: simen.kjaras at 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.

--


More information about the Digitalmars-d-bugs mailing list