Closed
Bug 1184385
Opened 10 years ago
Closed 10 years ago
Implement an equivalent of std::tie in mfbt/Tuple.h
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: seth, Assigned: botond)
References
Details
Attachments
(1 file)
std::tie is really handy for making code that involves std::pair more readable. In addition it's handy generally for working with tuples. Let's implement an equivalent.
| Assignee | ||
Comment 1•10 years ago
|
||
Bug 1184385 - Add a Tie() utility function for tuples (the equivalent of std::tie()) to MFBT. r=froydnj
Attachment #8635729 -
Flags: review?(nfroyd)
| Assignee | ||
Comment 2•10 years ago
|
||
Build-only Try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d125020356c
Assignee: nobody → botond
Comment 3•10 years ago
|
||
Comment on attachment 8635729 [details]
MozReview Request: Bug 1184385 - Add a Tie() utility function for tuples (the equivalent of std::tie()) to MFBT. r=froydnj
https://reviewboard.mozilla.org/r/13601/#review12245
::: mfbt/tests/TestTuple.cpp:151
(Diff revision 1)
> + return true;
Since we want Tie to work automatically with conversion, is it worth adding a test that actually requires conversion when assigning to the elements? Or writing a standalone test to ensure converting elements works?
Attachment #8635729 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8635729 [details]
MozReview Request: Bug 1184385 - Add a Tie() utility function for tuples (the equivalent of std::tie()) to MFBT. r=froydnj
Bug 1184385 - Add a Tie() utility function for tuples (the equivalent of std::tie()) to MFBT. r=froydnj
Attachment #8635729 -
Flags: review+ → review?(nfroyd)
| Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8635729 [details]
MozReview Request: Bug 1184385 - Add a Tie() utility function for tuples (the equivalent of std::tie()) to MFBT. r=froydnj
Updated test to add a part involving conversions. Carrying r+.
New build-only Try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f4e99b80b5ed
Attachment #8635729 -
Flags: review?(nfroyd) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•