更新时间:2022-11-01 16:48:22
一个很好的理由是,其中一个标准中要求在标准容器中可用的类 X
的要求是,表达式 a = b
类型 X&
(其中 a
是类型 X
和 b
是类型 X
的右值。
One good reason is that one of the requirements in the standard for a class X
to be useable in the standard containers is that the expression a = b
must have type X&
(where a
is an lvalue of type X
and b
is an rvalue of type X
).