can I make std::list insert new elements with order ? or got to use std::sort?

Viewed 12810

If I want to use std::list and that the new elements inserted to the list will be inserted to the right position in relation to a compare function - can I do it ? or I have to use std::sort after each insertion?

3 Answers
Related