void abc(int &a)
{
std::cout <<"abc1:"<< a << std::endl;
}
void abc(int &&a)
{
std::cout <<"abc2:"<< a << std::endl;
}
int main()
{
abc(1);
int a = 1;
abc(a);
}
abc2:1
abc1:1
void abc(int &a)
{
std::cout <<"abc1:"<< a << std::endl;
}
void abc(int &&a)
{
std::cout <<"abc2:"<< a << std::endl;
}
int main()
{
abc(1);
int a = 1;
abc(a);
}
abc2:1
abc1:1