#include <list>
#include <string>
#include <algorithm>
int main()
{
std::list<std::string> superheroes {"Spidey", "Supes", "Bats"};
std::list<std::string> supervillains {"Goblin", "Luthor", "Joker"};
std::swap(superheroes, supervillains); //swaps fine
superheroes.swap(supervillains);
}
I2luY2x1ZGUgPGxpc3Q+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDxhbGdvcml0aG0+CgppbnQgbWFpbigpCnsKCXN0ZDo6bGlzdDxzdGQ6OnN0cmluZz4gc3VwZXJoZXJvZXMgeyJTcGlkZXkiLCAiU3VwZXMiLCAiQmF0cyJ9OwoJc3RkOjpsaXN0PHN0ZDo6c3RyaW5nPiBzdXBlcnZpbGxhaW5zIHsiR29ibGluIiwgIkx1dGhvciIsICJKb2tlciJ9OwoJc3RkOjpzd2FwKHN1cGVyaGVyb2VzLCBzdXBlcnZpbGxhaW5zKTsgIC8vc3dhcHMgZmluZQoJc3VwZXJoZXJvZXMuc3dhcChzdXBlcnZpbGxhaW5zKTsKfQ==