Consider the following functions
int f (const int& i)
{
cout << "in const reference function";
}
int f ( int &i)
{
cout << "in non const reference function";
}
int main()
{
int i;
f(3);
f(i);
}
In this case when the function call is bound with function definition, will it be at compile time or run time, as one is lvalue i
and the other is not?
Other than this two functions are same in terms of number and type of parameters.