C++: Experiments in partition and remove
iterator.wordpress.com
iterator.wordpress.com
You could even be nifty and return a reversed iterator yourself to hide the implementation detail from the caller.
Stable partition with constant storage is harder. I'm pretty sure it's not possible, but I'm not prepared to offer a proof of that. I believe it (at best) turns into NlgN moves (which is how stable_partition performs as well) no matter what exact approach you take.