@@ -17016,15 +17016,31 @@
17016
17016
\end{itemdecl}
17017
17017
17018
17018
\begin{itemdescr}
17019
+ \pnum
17020
+ \expects
17021
+ \tcode{Key} meets the \oldconcept{MoveAssignable} requirements.
17022
+
17019
17023
\pnum
17020
17024
\effects
17021
- Equivalent to:
17022
- \begin{codeblock}
17023
- auto [erase_first, erase_last] = ranges::remove_if(c, pred);
17024
- auto n = erase_last - erase_first;
17025
- c.erase(erase_first, erase_last);
17026
- return n;
17027
- \end{codeblock}
17025
+ Let $E$ be \tcode{bool(pred(as_const(e)))}.
17026
+ Erases all elements \tcode{e} in \tcode{c} for which $E$ holds.
17027
+
17028
+ \pnum
17029
+ \returns
17030
+ The number of elements erased.
17031
+
17032
+ \pnum
17033
+ \complexity
17034
+ Exactly \tcode{c.size()} applications of the predicate.
17035
+
17036
+ \pnum
17037
+ \remarks
17038
+ Stable\iref{algorithm.stable}.
17039
+ If an invocation of \tcode{erase_if} exits via an exception,
17040
+ \tcode{c} is in a valid but unspecified state\iref{defns.valid}.
17041
+ \begin{note}
17042
+ \tcode{c} still meets its invariants, but can be empty.
17043
+ \end{note}
17028
17044
\end{itemdescr}
17029
17045
17030
17046
\rSec2[flat.multiset]{Class template \tcode{flat_multiset}}
@@ -17612,15 +17628,31 @@
17612
17628
\end{itemdecl}
17613
17629
17614
17630
\begin{itemdescr}
17631
+ \pnum
17632
+ \expects
17633
+ \tcode{Key} meets the \oldconcept{MoveAssignable} requirements.
17634
+
17615
17635
\pnum
17616
17636
\effects
17617
- Equivalent to:
17618
- \begin{codeblock}
17619
- auto [erase_first, erase_last] = ranges::remove_if(c, pred);
17620
- auto n = erase_last - erase_first;
17621
- c.erase(erase_first, erase_last);
17622
- return n;
17623
- \end{codeblock}
17637
+ Let $E$ be \tcode{bool(pred(as_const(e)))}.
17638
+ Erases all elements \tcode{e} in \tcode{c} for which $E$ holds.
17639
+
17640
+ \pnum
17641
+ \returns
17642
+ The number of elements erased.
17643
+
17644
+ \pnum
17645
+ \complexity
17646
+ Exactly \tcode{c.size()} applications of the predicate.
17647
+
17648
+ \pnum
17649
+ \remarks
17650
+ Stable\iref{algorithm.stable}.
17651
+ If an invocation of \tcode{erase_if} exits via an exception,
17652
+ \tcode{c} is in a valid but unspecified state\iref{defns.valid}.
17653
+ \begin{note}
17654
+ \tcode{c} still meets its invariants, but can be empty.
17655
+ \end{note}
17624
17656
\end{itemdescr}
17625
17657
17626
17658
\rSec2[container.adaptors.format]{Container adaptors formatting}
0 commit comments