Standard-library sort function can not be used to sort values that are stored in a list.
std::list provides its own sort member function, which uses an algorithm that is optimized for sorting data stored in a list.

seen from Russia
seen from United States

seen from Singapore

seen from Germany
seen from United States

seen from United States

seen from Brazil

seen from Malaysia
seen from Germany

seen from United States

seen from Malaysia

seen from India

seen from Tunisia
seen from Spain
seen from Jamaica

seen from United States
seen from United States

seen from United States

seen from Malaysia
seen from Malaysia
Standard-library sort function can not be used to sort values that are stored in a list.
std::list provides its own sort member function, which uses an algorithm that is optimized for sorting data stored in a list.
Operations erase and push_back for std::list do not invalidate iterators to other elements
std::list does not support indexing
std::vector does
std::list is optimized for fast insertion and deletion anywhere within the container