Skip to content

Instantly share code, notes, and snippets.

@rikardonm
rikardonm / C++ normal operators.md
Created May 29, 2023 13:15 — forked from beached/C++ normal operators.md
A list of the normal signatures of C++ operators that allow overloading

C++ Operator Signatures

This is a list of C++ operators that can be overloaded and their normal signatures(a.k.a what an int would do). The order is the preffered order to use them(The first one listed is often preffered)

Arithmetic

operator+ addition

  • free function -> T operator+( T const & lhs, T const & rhs )
  • member function -> T operator+( T const & rhs ) const

operator+ unary plus

  • member function -> T operator+( ) const
% Manual of pgf-umlsd.sty, a convenient set of macros for drawing UML
% sequence diagrams.
% Written by Xu Yuan <[email protected]> from
% Southeast University, China.
% This file is part of pgf-umlsd
% you may get it at http://code.google.com/p/pgf-umlsd/
\documentclass{article}
\usepackage[margin=12mm]{geometry}
\usepackage{hyperref}