[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/language/noexcept [Back]  [Original]

noexcept operator (depuis C++11) cppreference.com
cppreference.com
Espaces de noms
Variantes

noexcept operator (depuis C++11)

De cppreference.com

<metanoindex/>

 
 
Langage C++
Sujets gnraux
Contrle de flux
Instructions conditionnelles
Instructions d'itration
Instructions de saut
Fonctions
dclaration de fonction
expression lambda
fonction gnrique
spcificateur inline
spcification d'exception (obsolte)
spcificateur noexcept (C++11)
Exceptions
Espaces de noms
Types
spcificateur decltype (C++11)
Qualificatifs
qualificatifs const et volatile
qualificatifs de stockage
qualificatif constexpr (C++11)
qualificatif auto (C++11)
qualificatif alignas (C++11)
Initialisation
Littraux
Expressions
oprateurs alternatifs
Utilitaires
Types
dclaration typedef
dclaration d'alias de type (C++11)
attributs (C++11)
Jette
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversions implicites
conversion const_cast
conversion static_cast
conversion dynamic_cast
conversion reinterpret_cast
conversions style C et style fonction
Allocation de mmoire
Classes
Qualificatifs spcifiques aux membres de classe
Fonctions membres spciales
Modles
classes gnriques
fonctions gnriques
spcialisation de modles
paquets de paramtres (C++11)
Divers
Assembleur
 
L'oprateur noexcept effectue une vrification de compilation qui renvoie vrai si l'expression est dclar ne pas jeter des exceptions .
Original:
The noexcept operator performs a compile-time check that returns true if an expression is declared to not throw any exceptions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Syntaxe

noexcept( expression )
Retourne un objet de type .. bool
Original:
Returns an object of type bool.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Explication

L'oprateur noexcept ne expression valuer. Le rsultat est false si le expression contient au moins une des constructions suivantes potentiellement valus:
Original:
The noexcept operator does not evaluate expression. The result is false if the expression contains at least one of the following potentially evaluated constructs:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dans tous les autres cas, le rsultat est true .
Original:
In all other cases the result is true.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Mots-cls

noexcept

Exemple

template <class T>
void self_assign(T& t) noexcept(noexcept(T::operator=)) 
{ // self_assign is noexcept if and only if T::operator= is noexcept
    t = t;
}


Voir aussi

noexcept spcificateur
ncessite une fonction ne pas jeter tout (C++11) exceptions
Original:
requires a function to not throw any exceptions (C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
spcification d'exception
spcifie les exceptions sont jets par un (obsolte) fonction
Original:
specifies what exceptions are thrown by a function (obsolte)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]

Web Proxy Viewer  |  New URL  |  Original Page