期刊文献+

类的运算符重载对左值/右值规则的破坏性研究

Research on Destruction of Operator Overloading of Class to the Lvalue or Rvalue Rule
下载PDF
导出
摘要 C++类的运算符重载时,由于其返回类型比C++内置的用于基本数据类型的运算符的返回类型复杂,导致C++原有的左值/右值规则遭到破坏。当使用类的重载运算符构造表达式时,需要避免构造过于复杂的表达式,以免造成表达式的数据混乱;或者不去重载那些容易使左值/右值规则遭到破坏的运算符,对类的对象禁用那样的运算符。 When operator of the class C++ overloads, because its return class is much more complex than that of the operator used for the basic data installed in C++, original lvalue or rvalue of C++ is damaged. When class overloading operator is used to construct expression, complicated expressions are avoided in order not to confuse its data; or the operator that damages easily the lvalue or rvalue rule is not overloaded, and such operator is forbidden to the object of the class.
作者 薛志良
出处 《电脑开发与应用》 2008年第2期5-7,共3页 Computer Development & Applications
关键词 运算符重载 左值 右值 运算规则 C++ operator overloading, lvalue rvalue, operator ruler C++
  • 相关文献

参考文献2

  • 1萨维奇.C++面向对象程序设计[M].北京:清华大学出版社,2005.
  • 2荣耀,刘未鹏译.Imperfect C++中文版[M].北京:人民邮电出版社,2006.

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部