std::numeric_limits::traps
De cppreference.com
< cpp | types | numeric limits
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
static const bool traps |
(hasta C++11) | |
static constexpr bool traps |
(desde C++11) | |
El valor de std::numeric_limits<T>::traps es true para todos los tipos aritméticos
T
que tienen al menos un valor que, si se usa como un argumento para una operación aritmética, se generará un trampa . 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 trampa. 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.
[editar] Especializaciones estándar
T
|
valor de 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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 | por lo general 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. |
[editar] Notas
En la mayoría de las plataformas de la división entera por cero siempre trampas y std::numeric_limits<T>::traps es true para todos los tipos de enteros que apoyan el valor 0. La excepción es el tipo bool: a pesar de la división por trampas false debido a la promoción integral de bool a int, son las trampas de valor cero int que. Cero no es un valor de 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.
You can help to correct and verify the translation. Click here for instructions.
En la mayoría de las plataformas, excepciones de punto flotante puede activarse y desactivarse en tiempo de ejecución (por ejemplo feenableexcept() en Linux o en Windows _controlfp), en cuyo caso el valor de std::numeric_limits<T>::traps para tipos de punto flotante refleja el estado de las instalaciones de captura de punto flotante en el momento de inicio del programa, que es false en la mayoría de los sistemas modernos. Una excepción sería un programa DEC Alpha, donde es true si se compila sin
-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.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ver también
Floating-point medio ambiente | |
[estático] |
identifica tipos de punto flotante que detectan tinyness antes de redondeo 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. (constante miembro pública estática) |
[estático] |
identifies the floating-point types that detect loss of precision as denormalization loss rather than inexact result (constante miembro pública estática) |