Pass iterators by value for ordered containers