右辺値と右辺値の参照を研究する際に、次の表が表示されている優れた投稿https://stackoverflow.com/a/11540204/368896を指摘しました。
lvalue const lvalue rvalue const rvalue
---------------------------------------------------------
X& yes
const X& yes yes yes yes
X&& yes
const X&& yes yes
この表は、右辺値が非定数左辺値参照にバインドできないことを示していることに注意してください。
ただし、VS2010では、次のことができるようです。
class A
{};
int main()
{
A & a = A(); // Binding an rvalue to a non-const lvalue reference?
}
私の誤解はどこにありますか?