Closed
Bug 1843181
Opened 1 year ago
Closed 1 year ago
EqualRange should return a std::pair, not a CompactPair
Categories
(Core :: MFBT, task, P5)
Core
MFBT
Tracking
()
RESOLVED
FIXED
117 Branch
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
EqualRange
currently returns a CompactPair
:
template <typename Container, typename Comparator>
CompactPair<size_t, size_t> EqualRange(const Container& aContainer,
size_t aBegin, size_t aEnd,
const Comparator& aCompare) {
I don't think the reasons for preferring CompactPair
over std::pair
apply here. Using std::pair
would be more ergonomic because you can do this:
auto [rangeStart, rangeEnd] = mozilla::EqualRange(...);
I didn't end up needing this change for anything, but I think it makes sense to do anyway.
Assignee | ||
Comment 1•1 year ago
|
||
mozilla::CompactPair doesn't seem appropriate because its base class optimization doesn't apply.
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/801cb21ffbb0 Make EqualRange return a std::pair. r=sergesanspaille
Comment 3•1 year ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox117:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•