سلام.
من کد زیر را نوشتم gcc و clang درست r value بودن را تشخیص میدن ولی vs2013 اینو l value تشخیص میده اشکال از کجاست؟
#include <iostream>
using namespace std;
void test(int& x)
{
cout << "l value" << endl;
x++;
}
void test(int&& x)
{
cout << "r value" << endl;
return test(x);
}
int main()
{
int a= 0;
test(int(a));
std::cout << a;
return 0;
}