Bug 17803 – std.typecons.Tuple: opAssign should return ref Tuple

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2017-09-04T05:57:51Z
Last change time
2017-10-16T09:57:48Z
Keywords
pull, trivial
Assigned to
No Owner
Creator
Simen Kjaeraas

Comments

Comment #0 by simen.kjaras — 2017-09-04T05:57:51Z
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.
Comment #1 by simen.kjaras — 2017-09-07T06:25:16Z
Apparently I wasn't paying attention when filing this. The above code should be: Tuple!int foo() { Tuple!int a; return a = tuple(3); }
Comment #2 by github-bugzilla — 2017-09-07T07:17:26Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/ba2a1cee1711f38268ab65dde49defc5768a5377 Fix issue 17803 std.typecons.Tuple: opAssign should return ref Tuple https://github.com/dlang/phobos/commit/ccadf2530bb143701537f81141cb7f03bdba7506 Merge pull request #5713 from Biotronic/Issue-8494 Fix issue 17803 std.typecons.Tuple: opAssign should return ref Tuple merged-on-behalf-of: MetaLang <[email protected]>
Comment #3 by github-bugzilla — 2017-10-16T09:57:48Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/ba2a1cee1711f38268ab65dde49defc5768a5377 Fix issue 17803 std.typecons.Tuple: opAssign should return ref Tuple https://github.com/dlang/phobos/commit/ccadf2530bb143701537f81141cb7f03bdba7506 Merge pull request #5713 from Biotronic/Issue-8494