| Common operators | | | |

in #busy7 years ago (edited)
Common operators
assignmentincrementdecrementarithmeticlogicalcomparisonmemberaccessother
a = ba += ba -= ba *= ba /= ba %= ba &= ba \= ba ^= ba <<= ba >>= b++a--aa++a--+a-aa + ba - ba * ba / ba % b~aa & ba \ba ^ ba << ba >> b!aa && ba \\ba == ba != ba < ba > ba <= ba >= ba <=> ba[b]a&aa->ba.ba->ba.*ba(...)a, b? :
Special operators
static_cast converts one type to another related type dynamic_cast converts within inheritance hierarchies const_cast adds or removes cv qualifiersreinterpret_cast converts type to unrelated typeC-style cast converts one type to another by a mix of static_cast, const_cast, and reinterpret_cast new creates objects with dynamic storage durationdelete destructs objects previously created by the new expression and releases obtained memory areasizeof queries the size of a typesizeof... queries the size of a parameter pack (since C++11)typeid queries the type information of a typenoexcept checks if an expression can throw an exception (since C++11)alignof queries alignment requirements of a type (since C++11)