The established idiom for invoking swap is:
swap
using std::swap swap(foo, bar);
This way, swap can be overloaded for user
If your some_container is standard container, std:: prefix is needless
#include #include #include int main(){ std::vectorv { 1, 7, 1, 3, 6, 7 }; std::sort( begin(v), end(v) ); // here ADL search finds std::begin, std::end }