[Error] call of overloaded 'swap(int&, int&)' is ambiguous
[Error] call of overloaded 'swap(double&, double&)' is ambiguous
[Error] call of overloaded 'swap(char&, char&)' is ambiguous
#include <iostream>
using namespace std;
template<typename A>
void swap(A a,A b){
cout<<"a="<<a<<"b="<<b;
A t;
t=a;
a=b; b=t;
cout<<"a="<<a<<"b="<<b;
}
int main() {
int a=23,b=99;
swap(a,b);
double c=3.22222,d=8.666666;
swap(c,d);
char e='x',f='y';
swap(e,f);
return 0;
}