2 .
, . , stable_partition , , .
gcc 4.8.1 :
template<typename _ForwardIterator, typename _Predicate>
_ForwardIterator
stable_partition(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred)
{
...
...
_Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last);
if (__buf.size() > 0)
return
std::__stable_partition_adaptive(__first, __last, __pred,
_DistanceType(__buf.requested_size()),
__buf.begin(),
_DistanceType(__buf.size()));
else
return
std::__inplace_stable_partition(__first, __pred,
_DistanceType(__buf.requested_size()));
}
std::__stable_partition_adaptive - , std::__inplace_stable_partition - .