Espaces de noms
Variantes
Actions

noexcept operator (depuis C++11)

De cppreference.com
< cpp‎ | language

 
 
Langage C++
Sujets généraux
Contrôle de flux
Instructions conditionnelles
Instructions d'itération
Instructions de saut
Fonctions
déclaration de fonction
expression lambda
fonction générique
spécificateur inline
spécification d'exception (obsolète)
spécificateur noexcept (C++11)
Exceptions
Espaces de noms
Types
spécificateur decltype (C++11)
Qualificatifs
qualificatifs const et volatile
qualificatifs de stockage
qualificatif constexpr (C++11)
qualificatif auto (C++11)
qualificatif alignas (C++11)
Initialisation
Littéraux
Expressions
opérateurs alternatifs
Utilitaires
Types
déclaration typedef
déclaration 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 mémoire
Classes
Qualificatifs spécifiques aux membres de classe
Fonctions membres spéciales
Modèles
classes génériques
fonctions génériques
spécialisation de modèles
paquets de paramètres (C++11)
Divers
Assembleur
 
L'opérateur noexcept effectue une vérification de compilation qui renvoie vrai si l'expression est déclaré à 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.
de déclarer que la fonction lever des exceptions pour certains types mais pas d'autres .
Original:
It can be used within a function template's
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier]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.

[modifier]Explication

L'opérateur noexcept ne expression évaluer. Le résultat est false si le expression contient au moins une des constructions suivantes potentiellement évalués:
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 résultat 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.

[modifier]Mots-clés

noexcept

[modifier]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;}


[modifier]Voir aussi

noexcept spécificateur
nécessite 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]
spécification d'exception
spécifie les exceptions sont jetés par un (obsolète) fonction
Original:
specifies what exceptions are thrown by a function (obsolète)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
close