#include <string>#include <algorithm>namespacefoo{template<classT1,classT2>voidswap(T1&,T2&){throw"foo::swap is called";}}intmain(){std::stringa1[42];std::stringa2[42];usingfoo::swap;swap(a1,a2);}
In function 'void std::swap(_Tp&, _Tp&) [with _Tp = std::string [42]]':
t.cpp:20: instantiated from here
Line 97: error: ISO C++ forbids assignment of arrays
compilation terminated due to -Wfatal-errors.