首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

内置类型的赋值演算返回对右(还是左?)操作数的引用

2012-08-22 
内置类型的赋值运算返回对右(还是左??)操作数的引用C/C++ codeThe return type from the assignment opera

内置类型的赋值运算返回对右(还是左??)操作数的引用

C/C++ code
The return type from the assignment operator should be the same as the return from assignment for the built-in types (Section 5.4.1, p. 160). Assignment to a built-in type returns a reference to its left-hand operand. Therefore, the assignment operator also returns a reference to the same type as its class.赋值操作符的返回类型应该与内置类型赋值运算返回的类型相同(第 5.4.1 节)。内置类型的赋值运算返回对[color=#FF0000]右[/color]操作数的引用,因此,赋值操作符也返回对同一类类型的引用。

C++primer 中文版 P411写的是“内置类型的赋值运算返回对右操作数的引用”。

“left-hand operand.”这个是做操作数吧,什么情况?

[解决办法]
returns a reference to its left-hand operand
left是左,这段话里哪有右了

热点排行