Probably 3 can be interpreted as other types (for example char
, unsigned
...), so it may be ambiguous to know what function you want to call the compiler. You need to specify a value of 3: long int
.
#include <iostream>
void fun(int*)=delete;
void fun(double)=delete;
void fun(char)=delete;
void fun(unsigned)=delete;
void fun(float)=delete;
void fun(long int);
int main()
{
fun((long int)3);
}
void fun(long int a)
{
std::cout<<a<<'\n';
}