Program Language/C & C++

[C++] operator 요약

야곰야곰+책벌레 2022. 1. 6. 14:17
728x90
반응형
Parenthesized expression ( expr )
Lambda [ capture-list ] lambda-declarator { stmt-List }
Scope resolution class-name :: member
Scope resolution namespace-name::member
Global ::name
Member selection object.member
Member selection pointer->member
Subscripting pointer [ expr ]
Function call expr ( expr-list )
Value construction type { expr-list }
Function-style type conversion type ( expr-list )
Post increment lvalue++
Post decrement lvalue--
Type identification typeid( type )
Run-time type indentification typeid( expr )
Run-time checked conversion dynamic_cast<type>(expr)
Compile-time checked conversion static_cast<type>(expr)
Unchecked conversion reinterpret_cast<type>(expr)
const conversion const_cast<type>(expr)
Size of object sizeof expr
Size of type sizeof(type)
Size of parameter pack sizeof... name
Alignment of type alignof(type)
Pre increment ++lvalue
Pre decrement --lvalue
Complement ~expr
Not !expr
Unary minus -expr
Unary plus +expr
Address of &expr
Dereference *expr
Create (allocate) new type
Create (allocate and initialize) new type(expr-list)
Create (allocate and initialize) new type{expr-list}
Create (place) new (expr-list) type
Create (place and initialize) new (expr-list) type(expr-list)
Create (place and initialize) new (expr-list) type{expr-list}
Destroy (deallocate) delete pointer
Destroy array delete[] pointer
Can expression throw? noexcept(expr)
Cast (type conversion) (type) expr
Member selection object.*pointer-to-member
Member selection pointer->*pointer-to-member
Multiply expr * expr
Divide expr / expr
Modulo (remainder) expr % expr
Add (plus) expr + expr
Subtract (minus) expr - expr
Shift left expr << expr
Shift right expr >> expr
Less than expr < expr
Less than or equal expr <= expr
Greater than expr > expr
Greater than or equal expr >= expr
Equal expr == expr
Not equal expr != expr
Bitwise and expr & expr
Bitwise exclusive-or expr ^ expr
Bitwise inclusive-or expr | expr
Logical and expr && expr
Logcial inclusive-or expr || expr
Conditional expression expr ? expr : expr
List { expr-list }
Throw exception throw expr
Simple assignment lvalue = expr
Multiply and assign lvalue *= expr
Divide and assign lvalue /= expr
Modulo and assign lvalue %= expr
Add and assign lvalue += expr
Subtract and assign lvalue -= expr
Shift left and assign lvalue <<= expr
Shift right and assign lvalue >>= expr
Bitwise and and assign lvalue &= expr
Bitwise inclusive-or and assign lvalue |= expr
Bitwise exclusive-or and assign lvalue ^= expr
comma (sequencing) expr, expr

 

728x90
반응형