O'Reilly logo
  • Alberto Pierotti thinks this is interesting:

std::swap(std::begin(data)+1, std::end(data)-1); // Interchange 2nd element with the last
data.pop_back();                                

From

Cover of Using the C++ Standard Template Libraries

Note

This code is wrong.
Replace swap with iter_swap.