◐ Shell
clean mode source ↗

std::numeric_limits::traps - cppreference.com

Da cppreference.com.

Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.

La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui.

Click here for the English version of this page

<metanoindex/>

<tbody> </tbody>

static const bool traps

(fino al c++11)

static constexpr bool traps

(dal C++11)

Il valore di std::numeric_limits<T>::traps è true per tutti i tipi aritmetici T che hanno almeno un valore che, se utilizzato come argomento per un'operazione aritmetica, genererà un trappola.

Original:

The value of std::numeric_limits<T>::traps is true for all arithmetic types T that have at least one value that, if used as an argument to an arithmetic operation, will generate a trappola.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Specializzazioni standard

T

valore di std::numeric_limits<T>::traps

Original:

value of std::numeric_limits<T>::traps

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

/* non-specialized */ false
bool false
char

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

signed char

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

unsigned char

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

wchar_t

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

char16_t

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

char32_t

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

short

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

unsigned short

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

int

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

unsigned int

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

long

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

unsigned long

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

long long

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

unsigned long long

di solito true

Original:

usually true

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

float

di solito false

Original:

usually false

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

double

di solito false

Original:

usually false

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

long double

di solito false

Original:

usually false

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Note

Sulla maggior parte delle piattaforme divisione intera per zero sempre trappole, e std::numeric_limits<T>::traps è true per tutti i tipi interi che supportano il valore 0. L'eccezione è il bool tipo: anche se la divisione per trappole false a causa di promozione integrale da bool a int, è il valore zero che int trappole. Zero non è un valore di tipo bool.

Original:

On most platforms integer division by zero always traps, and std::numeric_limits<T>::traps is true for all integer types that support the value 0. The exception is the type bool: even though division by false traps due to integral promotion from bool to int, it is the zero-valued int that traps. Zero is not a value 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.

Sulla maggior parte delle piattaforme, eccezioni a virgola mobile può essere attivato e disattivato in fase di esecuzione (ad esempio, su Linux o feenableexcept() _controlfp su Windows), nel qual caso il valore di std::numeric_limits<T>::traps per tipi a virgola mobile riflette lo stato di virgola mobile impianto di cattura a il tempo di avvio del programma, che è false sulla maggior parte dei sistemi moderni. Un'eccezione potrebbe essere un programma DEC Alpha, dove è true se compilato senza -ieee.

Original:

On most platforms, floating-point exceptions may be turned on and off at run time (e.g. feenableexcept() on Linux or _controlfp on Windows), in which case the value of std::numeric_limits<T>::traps for floating-point types reflects the state of floating-point trapping facility at the time of program startup, which is false on most modern systems. An exception would be a DEC Alpha program, where it is true if compiled without -ieee.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Vedi anche

Virgola mobile ambiente

identifica i tipi a virgola mobile che rilevano tinyness prima dell'arrotondamento

Original:

identifies floating-point types that detect tinyness before rounding

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(pubblico membro statico costante) [modifica]
identifies the floating-point types that detect loss of precision as denormalization loss rather than inexact result
(pubblico membro statico costante) [modifica]