I fail to see why a vector should be able to sort itself. This kind of thinking makes not even a tiny bit of sense to me. Even Java doesn't have a sort() member function in ArrayList. Instead, there's the static method Collections.sort(). This is Java's way of making it a free function. So even a language like Java, which doesn't even have free functions, is built without the idea that an array should sort itself.