让
int a = 0;
Run Code Online (Sandbox Code Playgroud)
那么是标准C++中(int)a的右值?
不同的编译器显示此代码的不同结果:
#include <iostream>
using namespace std;
void f(int& x)
{
cout << "l value" << endl;
}
void f(int&& x)
{
cout << "r value" << endl;
}
int main()
{
int a = 0;
f((int)a);
}
Run Code Online (Sandbox Code Playgroud)
编译器有不同的结果:
"not","and"等等是C++中的关键字(C中的宏).有没有办法在Visual Studio 2013中"启用"它们?我可以使用iso646.h包含的宏作为宏.但VS似乎无法将它们视为关键字.