17.9.2 Binary operators

原创 2006年05月21日 02:49:00
A binary operator must take two parameters, at least one of which must have
the class or struct type in which the
operator is declared. The shift operators (§14.8) are further constrained:
The type of the first parameter must be
the class or struct type in which the operator is declared, and the second
parameter must always have the type
int. A binary operator can return any type.
The signature of a binary operator consists of the operator token (+, -, *,
/, %, &, |, ^, <<, >>, ==, !=, >, <, >=, or
<=) and the types of the two formal parameters. The return type and the
names of the formal parameters are not
part of a binary operator?s signature.
Certain binary operators require pair-wise declaration. For every
declaration of either operator of a pair, there
must be a matching declaration of the other operator of the pair. Two
operator declarations match when they have
the same return type and the same type for each parameter. The following
operators require pair-wise declaration:
? operator == and operator !=
? operator > and operator <
? operator >= and operator <=


cliamte data operators(cdo)指南

  • 2015年07月19日 21:23
  • 1.39MB
  • 下载

mysql官方文档阅读笔记(四)Chapter 13 Functions and Operators第13章-函数和运算符


Java程序设计(Java9版):第2章 数据类型与运算符(Data types and Operators)

第2章 数据类型与运算符(Data types and Operators)I think everybody in this country should learn how to program ...


  • 2011年05月06日 08:52
  • 88KB
  • 下载

Divide a number by 3 without using *, /, +, -, % operators

原帖: http://stackoverflow.com/questions/11694546/divide-a-number-by-3-without-using-operators ======...

Ordinary Differential Operators

  • 2008年04月18日 09:16
  • 8.53MB
  • 下载
您举报文章:17.9.2 Binary operators