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. |
<metanoindex/>
<tbody> </tbody>
|
|
(fino al c++11) | |
|
|
(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 Original: value of The text has been machine-translated via Google Translate. |
| /* non-specialized */ | false
|
bool
|
false
|
char
|
di solito Original: usually The text has been machine-translated via Google Translate. |
signed char
|
di solito Original: usually The text has been machine-translated via Google Translate. |
unsigned char
|
di solito Original: usually The text has been machine-translated via Google Translate. |
wchar_t
|
di solito Original: usually The text has been machine-translated via Google Translate. |
char16_t
|
di solito Original: usually The text has been machine-translated via Google Translate. |
char32_t
|
di solito Original: usually The text has been machine-translated via Google Translate. |
short
|
di solito Original: usually The text has been machine-translated via Google Translate. |
unsigned short
|
di solito Original: usually The text has been machine-translated via Google Translate. |
int
|
di solito Original: usually The text has been machine-translated via Google Translate. |
unsigned int
|
di solito Original: usually The text has been machine-translated via Google Translate. |
long
|
di solito Original: usually The text has been machine-translated via Google Translate. |
unsigned long
|
di solito Original: usually The text has been machine-translated via Google Translate. |
long long
|
di solito Original: usually The text has been machine-translated via Google Translate. |
unsigned long long
|
di solito Original: usually The text has been machine-translated via Google Translate. |
float
|
di solito Original: usually The text has been machine-translated via Google Translate. |
double
|
di solito Original: usually The text has been machine-translated via Google Translate. |
long double
|
di solito Original: usually The text has been machine-translated via Google Translate. |
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 | |
[statico] |
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. (pubblico membro statico costante) [modifica] |
[statico] |
identifies the floating-point types that detect loss of precision as denormalization loss rather than inexact result (pubblico membro statico costante) [modifica] |