Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > C/C++ > 14.2.4 Binary operator overload resolution
【标  题】:14.2.4 Binary operator overload resolution
【关键字】:14.2.4,Binary,operator,overload,resolution
【来  源】:http://blog.csdn.net/masterall/archive/2005/12/11/549856.aspx

14.2.4 Binary operator overload resolution

Your Ad Here An operation of the form x op y, where op is an overloadable binary
operator, x is an expression of type X,
and y is an expression of type Y, is processed as follows:
?The set of candidate user-defined operators provided by X and Y for the
operation operator op(x, y)
is determined. The set consists of the union of the candidate operators
provided by X and the candidate
operators provided by Y, each determined using the rules of ?4.2.5. If X
and Y are the same type, or if X
and Y are derived from a common base type, then shared candidate operators
only occur in the combined
set once.
?If the set of candidate user-defined operators is not empty, then this
becomes the set of candidate
operators for the operation. Otherwise, the predefined binary operator op
implementations become the
set of candidate operators for the operation. The predefined
implementations of a given operator are
specified in the description of the operator (?4.7 through ?4.13).
?The overload resolution rules of ?4.4.2 are applied to the set of
candidate operators to select the best
operator with respect to the argument list (x, y), and this operator
becomes the result of the overload
resolution process. If overload resolution fails to select a single best
operator, a compile-time error
occurs.
14.2.3 Unary operator overload resolution:【上一篇】
14.2.1 Operator precedence and associativity:【下一篇】
【相关文章】
  • 14.2.3 Unary operator overload resolution
  • 14.2.2 Operator overloading
  • 14.2.5 Candidate user-defined operators
  • 14.2.6.2 Binary numeric promotions
  • Domain Pollution Resolution 域污染解除
  • An introduction to bitwise operators
  • .Net 2.0 下Container性能比较: Binary Serialize Dataset vs Custom Classes
  • about sam8rcri binary code
  • Making plain binary files using a C compiler(i386)
  • FreeBSD 5.3 to FreeBSD 5.4 binary upgrade
  • 【随机文章】
  • 24.3 Attribute instances
  • 重装LAMP
  • 终于不用为了调试一个ARX(.net)程序而反复重新启动AutoCAD了!!!
  • 如何防止黒客远程盗取QQ密码
  • 用flash制作简单音乐播放器
  • 关于lslpp命令
  • Intuos 3数码板手绘马克笔效果图(2)
  • windows下命令行启停Oracle服务
  • 我的博客日志
  • 基于C#的接口基础教程之三
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.