这里算出
这里算出
以下表达式为xvalue表达式:
这里给出一个例子
struct X { int n; };
X{4}; // prvalue: does not have an identity
X{4}.n; // xvalue: does have an identity and denotes resources
// that can be reused但是当我尝试使用&来cout X{4}.n的地址时,编译器拒绝编译。
cout << &X{4}.n << endl; // error C2102: '&' requires l-value这是否意味着我永远得不到xvalue的地址?
发布于 2019-12-14 09:37:56
https://stackoverflow.com/questions/59332607
复制相似问题