note: candidate: 'std::_Requirestd::__not_<std::__is_tuple_like<_Tp >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = int; std::_Requirestd::__not_<std::__is_tuple_like<_Tp >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]' 196 | swap(_Tp& __a, _Tp& __b) | ^~~~
#include <iostream>
using namespace std;
template <class T>
void swap(T & x, T & y)
{
T t;
t = x;
x = y;
y = t;
}
main(void)
{
char ch1, ch2;
cout << "Enter the characters a and b: ";
cin >> ch1 >> ch2;
swap(ch1, ch2);//error here
cout << "On swapping ch1 and ch2: " << ch1 << " " << ch2 << endl;
int a,b;
cout << "Enter the characters a and b: ";
cin >> a >> b;
swap(a, b);//error here
cout << "On swapping ch1 and ch2: " << a << " " << b << endl;
}