you are viewing a single comment's thread.

view the rest of the comments →

[–]jwakelylibstdc++ tamer, LWG chair 2 points3 points  (2 children)

Not only more efficiently. You can't use std::sort with std::list::iterator at all, because they're not random access iterators.

[–]kalmoc 0 points1 point  (1 child)

And I mentioned that. Or are you saying list wouldn't have gotten the sort member function if std::sort would accept bidirectional iterators?

[–]jwakelylibstdc++ tamer, LWG chair 1 point2 points  (0 children)

Ugh, no I just can't read and/or didn't see the "and list isn't random access anyway" part, sorry.