I say not to try to find a matching STL call where a single line of simple hand written code would be sufficient. This was a general remark, not a remark to this particular situation, at least not only.