Changed 'using std::swap;' to 'using namesapce std;' in swap_impl function to work around ADL bugs in some compilers.