关于右值引用:非恒量右值引用只能绑定到非常量右值

关于右值引用:非常量右值引用只能绑定到非常量右值
int && i =10;
这样说来10是个右值而不是常量右值了?
------解决思路----------------------
常量是指什么,const么。
10本来就是个int类型的prvalue。非类/数组类型的prvalue的类型无所谓cv-qualified,这个和C兼容。如果是个class倒是可以有const类型的prvalue。关于数组类型倒是有个CWG defect:http://wg21.cmeerw.net/cwg/issue1059 。

WG21/N3936
3.10
4 Unless otherwise indicated (5.2.2), prvalues shall always have complete types or the void type; in addition to
these types, glvalues can also have incomplete types. [ Note: class and array prvalues can have cv-qualified
types; other prvalues always have cv-unqualified types. See Clause 5. —end note ]
Note 56) In C++ class prvalues can have cv-qualified types (because they are objects). This differs from ISO C, in which non-lvalues never have cv-qualified types.


------解决思路----------------------
constness是描述对象的, rvalueness是描述表达式的, 两者是正交的。 对象10是字面常量, 表达式10是右值。