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 United Kingdom
seen from China
seen from Spain
seen from Yemen
seen from China
seen from China

seen from Italy
seen from India
seen from United States
seen from United Kingdom
seen from Canada
seen from Germany
seen from China

seen from Canada
seen from Malaysia

seen from Malaysia
seen from United Kingdom

seen from United Kingdom
seen from Canada

seen from Kyrgyzstan
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