`Description`

`Description`

```
```*Stable_partition* is much like *partition*: it reorders the elements in the range *[first, last)* based on the function object *pred*, such that all of the elements that satisfy *pred *appear before all of the elements that fail to satisfy it. The postcondition is that, for some iterator *middle* in the range *[first, last)*, *pred(*i)* is *true* for every iterator *i* in the range *[first, middle)* and *false* for every iterator *i* in the range *[middle, last)*. The return value of *stable_partition* is *middle*.

*Stable_partition* differs from *partition* in that *stable_partition* is guaranteed to preserve relative order. That is, if *x* and *y* are elements in *[first, last)* such that *pred(x) == pred(y)*, and if *x* precedes *y*, then it will still be true after *stable_partition* is true that *x* precedes *y*. [1]