Arithmetic operators
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
You can help to correct and verify the translation. Click here for instructions.
Operator name | Syntax | Overloadable | Prototype examples (for class T) | |
---|---|---|---|---|
Inside class definition | Outside class definition | |||
unary plus | +a | Yes | T T::operator+()const; | T operator+(const T &a); |
unary minus | -a | Yes | T T::operator-()const; | T operator-(const T &a); |
addition | a + b | Yes | T T::operator+(const T2 &b)const; | T operator+(const T &a, const T2 &b); |
subtraction | a - b | Yes | T T::operator-(const T2 &b)const; | T operator-(const T &a, const T2 &b); |
multiplication | a * b | Yes | T T::operator*(const T2 &b)const; | T operator*(const T &a, const T2 &b); |
division | a / b | Yes | T T::operator/(const T2 &b)const; | T operator/(const T &a, const T2 &b); |
modulo | a % b | Yes | T T::operator%(const T2 &b)const; | T operator%(const T &a, const T2 &b); |
bitwise NOT | ~a | Yes | T T::operator~()const; | T operator~(const T &a); |
bitwise AND | a & b | Yes | T T::operator&(const T2 &b)const; | T operator&(const T &a, const T2 &b); |
bitwise OR | a | b | Yes | T T::operator|(const T2 &b)const; | T operator|(const T &a, const T2 &b); |
bitwise XOR | a ^ b | Yes | T T::operator^(const T2 &b)const; | T operator^(const T &a, const T2 &b); |
bitwise left shift | a << b | Yes | T T::operator<<(const T2 &b)const; | T operator<<(const T &a, const T2 &b); |
bitwise right shift | a >> b | Yes | T T::operator>>(const T2 &b)const; | T operator>>(const T &a, const T2 &b); |
|
Sommaire |
[modifier]Explication
You can help to correct and verify the translation. Click here for instructions.
[modifier]Conversions
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- Si l'un des opérandes est de type énumération portée, aucune conversion n'est effectuée: l'autre opérande et le type de retour doit avoir le même typeOriginal:If either operand has scoped enumeration type, no conversion is performed: the other operand and the return type must have the same typeThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Dans le cas contraire, si l'un des opérandes est longdouble, l'autre opérande est converti en longdoubleOriginal:Otherwise, if either operand is longdouble, the other operand is converted to longdoubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Dans le cas contraire, si l'un des opérandes est double, l'autre opérande est converti en doubleOriginal:Otherwise, if either operand is double, the other operand is converted to doubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Dans le cas contraire, si l'un des opérandes est float, l'autre opérande est converti en floatOriginal:Otherwise, if either operand is float, the other operand is converted to floatThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Dans le cas contraire, l'opérande est de type entier (parce que bool, char, char16_t, char32_t, wchar_t, sans portée et le dénombrement ont été promus à ce stade) et conversions intégrales sont appliquées pour produire le type commun, comme suit:Original:Otherwise, the operand has integer type (because bool, char, char16_t, char32_t, wchar_t, and unscoped enumeration were promoted at this point) and conversions intégrales are applied to produce the common type, as follows:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Si les deux opérandes sont signés ou les deux ne sont pas signés, l'opérande avec moins' rang de conversion est converti à l'opérande avec le grade de conversion supérieur entierOriginal:If both operands are signed or both are unsigned, the operand with lesser conversion rank is converted to the operand with the greater integer conversion rankThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Dans le cas contraire, si le rang de conversion opérande non signé est supérieur ou égal au rang de conversion de l'opérande signé, l'opérande signé est converti en type de l'opérande non signé de .Original:Otherwise, if the unsigned operand's conversion rank is greater or equal to the conversion rank of the signed operand, the signed operand is converted to the unsigned operand's type.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Sinon, si le type signé opérande peut représenter toutes les valeurs de l'opérande non signé, l'opérande non signé est converti en type de l'opérande signataireOriginal:Otherwise, if the signed operand's type can represent all values of the unsigned operand, the unsigned operand is converted to the signer operand's typeThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- Sinon, les deux opérandes sont convertis en contrepartie de type unsigned l'opérande signé le .Original:Otherwise, both operands are converted to the unsigned counterpart of the signed operand's type.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier]Débordements
où n est le nombre de bits dans cet entier particulière. Par exemple pour unsignedint, ajoutant un UINT_MAX donne 0, et en soustrayant un de 0 donne UINT_MAX .
where n is the number of bits in that particular integer. E.g. for unsignedint, adding one to UINT_MAX gives 0, and subtracting one from 0 gives UINT_MAX.
You can help to correct and verify the translation. Click here for instructions.
-ftrapv
de GCC et Clang), ou peut être complètement optimized out by the compiler .-ftrapv
in GCC and Clang), or may be completely optimized out by the compiler.You can help to correct and verify the translation. Click here for instructions.
[modifier]Opérateurs arithmétiques unaires
A
promu et pour chaque type de T
, les signatures de fonction suivants participent à la résolution de surcharge:A
and for every type T
, the following function signatures participate in overload resolution:You can help to correct and verify the translation. Click here for instructions.
A operator+(A) | ||
T* operator+(T*) | ||
A operator-(A) | ||
You can help to correct and verify the translation. Click here for instructions.
a
non signé, la valeur de -a
est 2b-a, où
b
est le nombre de bits après la promotion .a
, the value of -a
is 2b-a, where
b
is the number of bits after promotion.You can help to correct and verify the translation. Click here for instructions.
#include <iostream>int main(){char c =0x6a;int n1 =1;unsignedchar n2 =1;unsignedint n3 =1;std::cout<<"char: "<< c <<" int: "<<+c <<'\n'<<"-1, where 1 is signed: "<<-n1 <<'\n'<<"-1, where 1 is unsigned char: "<<-n2 <<'\n'<<"-1, where 1 is unsigned int: "<<-n3 <<'\n';char a[3];std::cout<<"size of array: "<< sizeof a <<'\n'<<"size of pointer: "<< sizeof +a <<'\n';}
Résultat :
char: j int: 106 -1, where 1 is signed: -1 -1, where 1 is unsigned char: -1 -1, where 1 is unsigned int: 4294967295 size of array: 3 size of pointer: 8
[modifier]Opérateurs d'ajout
L
et R
et pour chaque type d'objet T
, les signatures de fonction suivants participent à la résolution de surcharge:L
and R
and for every object type T
, the following function signatures participate in overload resolution:You can help to correct and verify the translation. Click here for instructions.
LR operator+(L, R) | ||
LR operator-(L, R) | ||
T* operator+(T*, std::ptrdiff_t) | ||
T* operator+(std::ptrdiff_t, T*) | ||
T* operator-(T*, std::ptrdiff_t) | ||
std::ptrdiff_t operator-(T*, T*) | ||
LR
est le résultat de conversions arithmétiques habituelles sur L
et R
LR
is the result of usual arithmetic conversions on L
and R
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- Un pointeur non-ensemble objet est traité comme un pointeur vers le premier élément d'un tableau de taille 1 .Original:A pointer to non-array object is treated as a pointer to the first element of an array with size 1.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Si les points
P
pointeur vers l'élémenti
th d'un tableau, alors les expressionsP+n
,n+P
etP-n
sont des pointeurs du même type qui pointent vers lei+n
th,i+n
th, et l'élémenti-n
th du même réseau, respectivement. Le résultat de l'addition pointeur peut aussi être un pointeur d'un past-the-end (c'est-à-pointeurP
tels que les pointsP-1
expression sur le dernier élément du tableau). Toutes les autres situations (c'est-à-tente de générer un pointeur qui ne pointe pas moins un élément du même réseau ou d'un passé à la fin) invoquer un comportement indéfini .Original:If the pointerP
points to thei
th element of an array, then the expressionsP+n
,n+P
, andP-n
are pointers of the same type that point to thei+n
th,i+n
th, andi-n
th element of the same array, respectively. The result of pointer addition may also be a one-past-the-end pointer (that is, pointerP
such that the expressionP-1
points to the last element of the array). Any other situations (that is, attempts to generate a pointer that isn't pointing at an element of the same array or one past the end) invoke undefined behavior.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Si les points
P
pointeur vers l'élémenti
th d'un tableau, et les pointsQ
pointeur à l'élémentj
th de la même gamme, leP-Q
expression a la valeur i-j, si la valeur s'inscrit dans std::ptrdiff_t. Les deux opérandes doivent pointer vers les éléments du tableau même (ou l'un après l'extrémité), sinon le comportement est indéfini. Si le résultat ne correspond pas à std::ptrdiff_t, le comportement est indéfini .Original:If the pointerP
points to thei
th element of an array, and the pointerQ
points at thej
th element of the same array, the expressionP-Q
has the value i-j, if the value fits in std::ptrdiff_t. Both operands must point to the elements of the same array (or one past the end), otherwise the behavior is undefined. If the result does not fit in std::ptrdiff_t, the behavior is undefined.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Si le 0 valeur est ajoutée ou soustraite d'un pointeur, le résultat est le pointeur, inchangé. Si deux pointeurs ponctuelles au même objet ou sont à la fois un passé à la fin du même réseau, ou les deux sont des pointeurs NULL, alors le résultat de la soustraction est égal à (std::ptrdiff_t)0 .Original:If the value 0 is added or subtracted from a pointer, the result is the pointer, unchanged. If two pointers point at the same object or are both one past the end of the same array, or both are null pointers, then the result of subtraction is equal to (std::ptrdiff_t)0.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
RandomAccessIterator
.RandomAccessIterator
concept.You can help to correct and verify the translation. Click here for instructions.
#include <iostream>int main(){char c =2;unsignedint un =2;int n =-10;std::cout<<" 2 + (-10), where 2 is a char = "<< c + n <<'\n'<<" 2 + (-10), where 2 is unsigned = "<< un + n <<'\n'<<" -10 - 2.12 = "<< n -2.12<<'\n'; char a[4]={'a', 'b', 'c', 'd'};char* p =&a[1];std::cout<<"Pointer addition examples: "<<*p <<*(p +2)<<*(2+ p)<<*(p -1)<<'\n';char* p2 =&a[4];std::cout<<"Pointer difference: "<< p2 - p <<'\n';}
Résultat :
2 + (-10), where 2 is a char = -8 2 + (-10), where 2 is unsigned = 4294967288 -10 - 2.12 = -12.12 Pointer addition examples: bdda Pointer difference: 3
[modifier]Opérateurs de multiplication
LA
et RA
et pour chaque paire de types intégraux LI
promus et RI
la suite de signatures de fonction participer à la résolution de surcharge:LA
and RA
and for every pair of promoted integral types LI
and RI
the following function signatures participate in overload resolution:You can help to correct and verify the translation. Click here for instructions.
LRA operator*(LA, RA) | ||
LRA operator/(LA, RA) | ||
LRI operator%(LI, RI) | ||
LRx
est le résultat de conversions arithmétiques habituelles sur Lx
et Rx
LRx
is the result of usual arithmetic conversions on Lx
and Rx
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- arrondis à la mise en oeuvre définie par (avant C++11) directionOriginal:rounded in implementation-defined direction (avant C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - la partie décimale éliminée (tronquée vers zéro) (depuis C++11)Original:with any fractional part discarded (truncated towards zero) (depuis C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a/b
representible dans le type de résultat, (a/b)*b + a%b == a. Si le second opérande est égal à zéro, le comportement est indéfini .a/b
is representible in the result type, (a/b)*b + a%b == a. If the second operand is zero, the behavior is undefined.You can help to correct and verify the translation. Click here for instructions.
- si une ou les deux opérandes sont négatifs, le signe du reste est définie par la mise en oeuvre, car elle dépend de la direction de l'arrondi (avant C++11) division entièreOriginal:if one or both operands are negative, the sign of the remainder is implementation-defined, as it depends on the rounding direction of integer division (avant C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>int main(){char c =2;unsignedint un =2;int n =-10;std::cout<<"2 * (-10), where 2 is a char = "<< c * n <<'\n'<<"2 * (-10), where 2 is unsigned = "<< un * n <<'\n'<<"-10 / 2.12 = "<< n /2.12<<'\n'<<"-10 / 21 = "<< n /21<<'\n'<<"-10 % 21 = "<< n %21<<'\n';}
Résultat :
2 * (-10), where 2 is a char = -20 2 * (-10), where 2 is unsigned = 4294967276 -10 / 2.12 = -4.71698 -10 / 21 = 0 -10 % 21 = -10
[modifier]Opérateurs logiques bit à bit
L
promus et R
la suite de signatures de fonction participer à la résolution de surcharge:L
and R
the following function signatures participate in overload resolution:You can help to correct and verify the translation. Click here for instructions.
R operator~(R) | ||
LR operator&(L, R) | ||
LR operator^(L, R) | ||
LR operator|(L, R) | ||
LR
est le résultat de conversions arithmétiques habituelles sur L
et R
LR
is the result of usual arithmetic conversions on L
and R
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>int main(){std::cout<<std::hex<<std::showbase; uint16_t mask =0x00f0; uint32_t a =0x12345678;std::cout<<"Value: "<< a <<" mask: "<< mask <<'\n'<<"Setting bits: "<<(a
Résultat :
Value: 0x12345678 mask: 0xf0 Setting bits: 0x123456f8 Clearing bits: 0x12345608 Selecting bits: 0x70
[modifier]Opérateurs de décalage au niveau du bit
L
promus et R
, les signatures de fonction suivants participent à la résolution de surcharge:L
and R
, the following function signatures participate in overload resolution:You can help to correct and verify the translation. Click here for instructions.
L operator<<(L, R) | ||
L operator>>(L, R) | ||
You can help to correct and verify the translation. Click here for instructions.
a
non signé, la valeur de a << b
est la valeur de a * 2b, réduit modulo la valeur maximale du type de retour plus 1 (c'est-à-décalage gauche est effectuée et les bits qui se décalés hors du type de destination sont éliminés). Pour
a
signé, la valeur de a << b
est a * 2bs'il est représentable par le type de retour, sans quoi le comportement n'est pas défini .
a
, the value of a << b
is the value of a * 2b, reduced modulo maximum value of the return type plus 1 (that is, bitwise left shift is performed and the bits that get shifted out of the destination type are discarded). For signed
a
, the value of a << b
is a * 2bif it is representable by the return type, otherwise the behavior is undefined.
You can help to correct and verify the translation. Click here for instructions.
a
non signé et pour a
signé avec des valeurs non négatives, la valeur de a >> b
est la partie entière de a/2b. Pour
a
négatif, la valeur de a >> b
est définie par l'implémentation (dans la plupart des implémentations, ce décalage arithmétique effectue droit, de sorte que le résultat reste négatif)a
and for signed a
with nonnegative values, the value of a >> b
is the integer part of a/2b. For negative
a
, the value of a >> b
is implementation-defined (in most implementations, this performs arithmetic right shift, so that the result remains negative)You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>enum{ONE=1, TWO=2};int main(){std::cout<<std::hex<<std::showbase;char c =0x10;unsignedlonglong ull =0x123;std::cout<<"0x123 << 1 = "<<(ull <<1)<<'\n'<<"0x123 << 63 = "<<(ull <<63)<<'\n'// overflow in unsigned<<"0x10 << 10 = "<<(c <<10)<<'\n';// char is promoted to intlonglong ll =-1000;std::cout<<std::dec<<"-1000 >> 1 = "<<(ll >> ONE)<<'\n';}
Résultat :
0x123 << 1 = 0x246 0x123 << 63 = 0x8000000000000000 0x10 << 10 = 0x4000 -1000 >> 1 = -500
[modifier]Bibliothèque standard
You can help to correct and verify the translation. Click here for instructions.
[modifier]Opérateurs arithmétiques unaires
met en œuvre + unaire et unaire - Original: implements unary + and unary - The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::chrono::duration ) | |
s'applique opérateurs unaires aux nombres complexes Original: applies unary operators to complex numbers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
applique un opérateur arithmétique unaire pour chaque élément de la valarray Original: applies a unary arithmetic operator to each element of the valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::valarray ) |
[modifier]Opérateurs d'ajout
modifie le point de temps de la durée donnée Original: modifies the time point by the given duration The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
concatène deux chaînes ou une chaîne et un char Original: concatenates two strings or a string and a char The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
progrès de l'itérateur Original: advances the iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::reverse_iterator ) | |
décrémente l'itérateur Original: decrements the iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::reverse_iterator ) | |
progrès de l'itérateur Original: advances the iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::move_iterator ) | |
décrémente l'itérateur Original: decrements the iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::move_iterator ) | |
effectue l'arithmétique sur les nombres complexes deux valeurs complexes ou d'un complexe et un scalaire Original: performs complex number arithmetics on two complex values or a complex and a scalar The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
des opérateurs binaires s'applique à chaque élément de valarrays deux, ou un valarray et une valeur Original: applies binary operators to each element of two valarrays, or a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) |
[modifier]Opérateurs de multiplication
met en œuvre des opérations arithmétiques avec des durées comme arguments Original: implements arithmetic operations with durations as arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
effectue l'arithmétique sur les nombres complexes deux valeurs complexes ou d'un complexe et un scalaire Original: performs complex number arithmetics on two complex values or a complex and a scalar The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
des opérateurs binaires s'applique à chaque élément de valarrays deux, ou un valarray et une valeur Original: applies binary operators to each element of two valarrays, or a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) |
[modifier]Opérateurs logiques bit à bit
effectue binaire AND, OR, XOR et NOT Original: performs binary AND, OR, XOR and NOT The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::bitset ) | |
effectue des opérations logiques binaires sur bitsets Original: performs binary logic operations on bitsets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
applique un opérateur arithmétique unaire pour chaque élément de la valarray Original: applies a unary arithmetic operator to each element of the valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::valarray ) | |
des opérateurs binaires s'applique à chaque élément de valarrays deux, ou un valarray et une valeur Original: applies binary operators to each element of two valarrays, or a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) |
[modifier]Opérateurs de décalage au niveau du bit
des opérateurs binaires s'applique à chaque élément de valarrays deux, ou un valarray et une valeur Original: applies binary operators to each element of two valarrays, or a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
effectue décalage binaire à gauche et déplacement vers la droite Original: performs binary shift left and shift right The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::bitset ) |
[modifier]Volet d'insertion / extraction opérateurs
You can help to correct and verify the translation. Click here for instructions.
extraits des données formatées Original: extracts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::basic_istream ) | |
extrait des tableaux de caractères et de caractères Original: extracts characters and character arrays The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
inserts en forme des données Original: inserts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::basic_ostream ) | |
insère des données de caractères Original: inserts character data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
sérialise et désérialise un nombre complexe Original: serializes and deserializes a complex number The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |
effectue flux d'entrée et de sortie de bitsets Original: performs stream input and output of bitsets The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
effectue des opérations d'entrée/sortie de flux sur des chaines de caractères (fonction générique) | |
effectue flux d'entrée et de sortie sur le moteur de nombres pseudo-aléatoires Original: performs stream input and output on pseudo-random number engine The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
effectue flux d'entrée et de sortie sur la distribution de nombre pseudo-aléatoire Original: performs stream input and output on pseudo-random number distribution The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
[modifier]Voir aussi
Opérateurs ordinaires | ||||||
---|---|---|---|---|---|---|
affectation | incrémentation décrémentation | arithmétique | logique | comparaison | accès aux membre | autre |
a = b | ++a | +a | !a | a == b | a[b] | a(...) |
Opérateurs spéciaux | ||||||
static_cast convertit un type dans un autre type compatible dynamic_cast convertit une classe de base virtuelle dans une classe dérivée const_cast convertit un type dans un type compatible avec des cv-qualifiers différents reinterpret_cast convertit un type dans un type incompatibles new allocation de la mémoire delete libère de la mémoire sizeof récupère la taille d'un type sizeof... récupère la taille d'un paquet de paramètres (depuis C++11) typeid récupère les informations de type d'un type noexcept vérifie si une expression peut lancer une exception (depuis C++11) alignof récupère les conditions d'alignement d'un type (depuis C++11) |