Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 3 additions & 24 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15427,32 +15427,11 @@
\begin{itemdescr}
\pnum
\effects
Adds elements to \tcode{c} as if by:
\begin{codeblock}
for (; first != last; ++first) {
value_type value = *first;
c.keys.insert(c.keys.end(), std::move(value.first));
c.values.insert(c.values.end(), std::move(value.second));
}
\end{codeblock}
Then, merges the sorted range of newly added elements and
the sorted range of pre-existing elements into a single sorted range; and
finally erases the duplicate elements as if by:
\begin{codeblock}
auto zv = ranges::zip_view(c.keys, c.values);
auto it = ranges::unique(zv, key_equiv(compare)).begin();
auto dist = distance(zv.begin(), it);
c.keys.erase(c.keys.begin() + dist, c.keys.end());
c.values.erase(c.values.begin() + dist, c.values.end());
\end{codeblock}
Equivalent to \tcode{insert(first, last)}.

\pnum
\complexity
Linear in $N$, where $N$ is \tcode{size()} after the operation.

\pnum
\remarks
Since this operation performs an in-place merge, it may allocate memory.
\end{itemdescr}

\indexlibrarymember{insert_range}{flat_map}%
Expand Down Expand Up @@ -16927,7 +16906,7 @@

\pnum
\complexity
Linear.
Linear in $N$, where $N$ is \tcode{size()} after the operation.
\end{itemdescr}

\indexlibrarymember{insert_range}{flat_set}%
Expand Down Expand Up @@ -17572,7 +17551,7 @@

\pnum
\complexity
Linear.
Linear in $N$, where $N$ is \tcode{size()} after the operation.
\end{itemdescr}

\indexlibrarymember{swap}{flat_multiset}%
Expand Down