最佳答案
你为什么能这么做
int a;
const double &m = a;
但是当你这么做的时候
int a;
double &m = a;
出错了吗?
error: non-const lvalue reference to type 'double' cannot bind to a value of unrelated type 'int'
编辑:
更具体地说,我试图理解非常量引用不能绑定 temp 对象的原因。