//普通四则运算
friend A operator +(const A & lhs, const A & rhs);
friend A operator -(const A & lhs, const A & rhs);
friend A operator *(const A & lhs, const A & rhs);
friend A operator /(const A & lhs, const A & rhs);
friend A operator %(const A & lhs, const A & rhs);
friend A operator *(const A & lhs, const int & rhs);//标量运算,如果存在
friend A operator *(const int & lhs, const A & rhs);//标量运算,如果存在 //关系操作符
friend bool operator == (const A & lhs, const A & rhs);
friend bool operator != (const A & lhs, const A & rhs);
friend bool operator < (const A & lhs, const A & rhs);
friend bool operator <= (const A & lhs, const A & rhs);
friend bool operator > (const A & lhs, const A & rhs);
friend bool operator >= (const A & lhs, const A & rhs); //逻辑操作符
friend bool operator || (const A & lhs, const A & rhs);
friend bool operator && (const A & lhs, const A & rhs);
bool A::operator!(); //正负操作符
A A::operator +();//取正
A A::operator -();//取负 //递增递减操作符
A & A::operator++();//前缀递增
A A::operator++(int);//后缀递增
A & A::operator--();//前缀递减
A A::operator--(int);//后缀递减 //动态存储管理操作符:全局或者成员函数均可
void * operator new(std::size_t size) throw(bad_alloc);
void * operator new(std::size_t size, const std::nothrow_t &) throw();
void * operator new(std::size_t size, void *base) throw();
void * operator new[](std::size_t size) throw(bad_alloc);
void operator delete(void *p);
void operator delete[](void *p); //赋值操作符
A & operator = (A &rhs);
A & operator = (const A & rhs);
A & operator = (A && rhs);
A & operator += (const A & rhs);
A & operator -= (const A & rhs);
A & operator *= (const A & rhs);
A & operator %= (const A & rhs);
A & operator &= (const A & rhs);
A & operator /= (const A & rhs);
A & operator |= (const A & rhs);
A & operator ^= (const A & rhs);
A & operator <<= (int n);
A & operator >>= (int n); //下标操作符
T & A::operator[] (int i);
const T & A::operator[](int i)const; //函数调用操作符
T A::operator()(...);//参数可选 //类型转换操作符
A::operator char *() const;
A::operator int() const;
A::operator double() const; //逗号操作符
T2 operator,(T1 t1, T2 t2);//不建议重载 //指针与选员操作符
A * A::operator & ();//取址操作符
A & A::operator *();//引领操作符
const A & A::operator *() const;//引领操作符
C * A::operator->();//选员操作符
const C * A::operator->() const;//选员操作符
C & A::operator->*(...);//选员操作符,指向类成员的指针 //流操作符
friend ostream & operator << (ostream &os, const A &a);
friend istream & operator >> (istream &is, A &a);

C++学习笔记15:操作符重载的函数原型列表(推荐)的更多相关文章

  1. OpenCV学习笔记(15)——更多的轮廓函数

    凸缺陷,以及如何找到凸缺陷 找某一点到一个多边形的最短距离 不同形状的匹配 1.凸缺陷 前面已经设计了轮廓的凸包和凸性缺陷的概念.OpenCV中有一个函数cv2.convexityDefect()可以 ...

  2. SQL反模式学习笔记15 分组

    目标:查询得到每组的max(或者min等其他聚合函数)值,并且得到这个行的其他字段 反模式:引用非分组列 单值规则:跟在Select之后的选择列表中的每一列,对于每个分组来说都必须返回且仅返回一直值. ...

  3. 并发编程学习笔记(15)----Executor框架的使用

    Executor执行已提交的 Runnable 任务的对象.此接口提供一种将任务提交与每个任务将如何运行的机制(包括线程使用的细节.调度等)分离开来的方法.通常使用 Executor 而不是显式地创建 ...

  4. C++基础 学习笔记五:重载之运算符重载

    C++基础 学习笔记五:重载之运算符重载 什么是运算符重载 用同一个运算符完成不同的功能即同一个运算符可以有不同的功能的方法叫做运算符重载.运算符重载是静态多态性的体现. 运算符重载的规则 重载公式 ...

  5. Ext.Net学习笔记15:Ext.Net GridPanel 汇总(Summary)用法

    Ext.Net学习笔记15:Ext.Net GridPanel 汇总(Summary)用法 Summary的用法和Group一样简单,分为两步: 启用Summary功能 在Feature标签内,添加如 ...

  6. ES6学习笔记<二>arrow functions 箭头函数、template string、destructuring

    接着上一篇的说. arrow functions 箭头函数 => 更便捷的函数声明 document.getElementById("click_1").onclick = ...

  7. python3.4学习笔记(二十) python strip()函数 去空格\n\r\t函数的用法

    python3.4学习笔记(二十) python strip()函数 去空格\n\r\t函数的用法 在Python中字符串处理函数里有三个去空格(包括'\n', '\r', '\t', ' ')的函数 ...

  8. APUE学习笔记——10.9 信号发送函数kill、 raise、alarm、pause

    转载注明出处:Windeal学习笔记 kil和raise kill()用来向进程或进程组发送信号 raise()用来向自身进程发送信号. #include <signal.h> int k ...

  9. Flutter学习笔记(4)--Dart函数

    如需转载,请注明出处:Flutter学习笔记(4)--Dart函数 Dart是一个面向对象的语言,所以函数也是对象,函数属于Function对象,函数可以像参数一样传递给其他函数,这样便于做回调处理: ...

随机推荐

  1. LSM树——放弃读能力换取写能力,将多次修改放在内存中形成有序树再统一写入磁盘

    LSM树(Log-Structured Merge Tree)存储引擎 代表数据库:nessDB.leveldb.hbase等 核心思想的核心就是放弃部分读能力,换取写入的最大化能力.LSM Tree ...

  2. LeetCode 423. Reconstruct Original Digits from English——学会观察,贪心思路

    Given a non-empty string containing an out-of-order English representation of digits 0-9, output the ...

  3. C# + winserver2008 openfiledialog 写入 textbox1 中的 路径不正确

    System.IO.Path.GetFullPath(openFileDialog1.FileName);//绝对路径 System.IO.Path.GetExtension(openFileDial ...

  4. iOS8 针对开发者所拥有的新特性汇总如下

    iOS8 针对开发者所拥有的新特性汇总如下 1.支持第三方键盘 2.自带网页翻译功能(即在线翻译) 3.指纹识别功能开放:第三方软件可以调用 4.Safari浏览器可直接添加新的插件. 5.可以把一个 ...

  5. iScroll 优化

    iScroll 它比较好的解决了移动互联网 web app 滚动支持问题以及点击事件缓慢的问题,经过简单配置即可让 web app 像原生 app 一样流畅,甚至都不需要改变原来的编码方式,目前它几乎 ...

  6. sdut 2605 A^X mod P

    http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2605 这个题卡的是优化,直观解法是在求x^y时 ...

  7. WP8.1 Study5:Data binding数据绑定

    一.数据绑定 最简单的编程UI控件的方法是写自己的数据来获取和设置控件的属性,e.g. , textBox1.Text = "Hello, world"; 但在复杂的应用程序,这样 ...

  8. Asp.net项目因Session阻塞导致页面打开速度变慢

    发现罪魁祸首是Session阻塞造成的.默认情况下session状态是“可写状态”(EnableSessionState=”true”),即当用户打开任何一个页面时,该页面的Session就会持有一个 ...

  9. SharePoint 2013 Nintex Workflow 工作流帮助(十二)

    博客地址 http://blog.csdn.net/foxdave 工作流动作 31. Create task(User interaction分组,企业版才有) 该操作用于在Microsoft Ex ...

  10. innerHTML..innerText..textContent

    /* * innerText和textContent 都是设置文字内容的,如果设置的内容当中有标签,也会直接的以文本的方式显示(标签的<>都会按照转义的方式进行解析) * innerTex ...