Closed
Bug 1665462
Opened 5 years ago
Closed 5 years ago
Add Vector::appendAll with move semantics
Categories
(Core :: MFBT, enhancement)
Core
MFBT
Tracking
()
RESOLVED
FIXED
84 Branch
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: arai, Assigned: sg)
Details
Attachments
(2 files)
We have the following:
template <typename T, size_t MinInlineCapacity = 0,
class AllocPolicy = MallocAllocPolicy>
class MOZ_NON_PARAM Vector final : private AllocPolicy {
...
template <typename U, size_t O, class BP>
MOZ_MUST_USE bool appendAll(const Vector<U, O, BP>& aU);
that uses copy-semantics, and if T
/U
doesn't support copy, this doesn't work.
bug 1665387 will require concatenating vectors that contains not-copy-able elements,
and the passed vector doesn't have to be kept after the concatenation.
It would be nice to provide appendAll
with move semantics, that moves all elements, and clears the passed vector.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D90522
Comment 3•5 years ago
|
||
Sorry for the delay, I'll get to these either later today or sometime tomorrow.
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fc6b7d8f4d98
Add moving Vector::appendAll(Vector&&) overload. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/3ba6cafe48d8
Use moving Vector::appendAll overload at a few places, or use move assignment. r=jwalden
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fc6b7d8f4d98
https://hg.mozilla.org/mozilla-central/rev/3ba6cafe48d8
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox84:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•