Don't get me wrong, I love C++, I'm primarily a C++ programmer. But this whole debacle with value categories is just a mess. Apparently an object's value category can be different from its type.
struct Data {
Data(int x) : m_x(x) {}
int m_x;
};
int main() {
Data&& a = Data(42);
}
In this example, 'a' has a type of rvalue-reference, but its value category is an lvalue since it's a named object.
How do we reconcile this while still advocating the language?