diff --git a/source/containers.tex b/source/containers.tex index 6210e070b1..3c698806a5 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -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}% @@ -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}% @@ -17572,7 +17551,7 @@ \pnum \complexity -Linear. +Linear in $N$, where $N$ is \tcode{size()} after the operation. \end{itemdescr} \indexlibrarymember{swap}{flat_multiset}%