Espaces de noms
Variantes
Actions

std::numeric_limits

De cppreference.com
< cpp‎ | types

 
 
 
Soutien aux types fondamentaux
Les types de base
Original:
Basic types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types fondamentaux
Fixe les types entiers largeur (C++11)
Limites numériques
Original:
Numeric limits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
numeric_limits
C numérique limite interface
Informations sur le type d'exécution
Original:
Runtime type information
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Caractères de type
Original:
Type traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Catégories de type primaire
Original:
Primary type categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
is_void (C++11)
is_array (C++11)
is_pointer (C++11)
is_enum (C++11)
is_union (C++11)
is_class (C++11)
is_function (C++11)
is_object (C++11)
is_scalar (C++11)
is_compound (C++11)
is_integral (C++11)
is_floating_point (C++11)
is_fundamental (C++11)
is_arithmetic (C++11)
is_reference (C++11)
is_lvalue_reference (C++11)
is_rvalue_reference (C++11)
is_member_pointer (C++11)
is_member_object_pointer (C++11)
is_member_function_pointer (C++11)
Les propriétés du type
Original:
Type properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
is_const (C++11)
is_volatile (C++11)
is_pod (C++11)
is_empty (C++11)
is_polymorphic (C++11)
is_abstract (C++11)
Opérations prises en charge
Original:
Supported operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
is_constructible
is_trivially_constructible
is_nothrow_constructible
(C++11)
(C++11)
(C++11)
is_default_constructible
is_trivially_default_constructible
is_nothrow_default_constructible
(C++11)
(C++11)
(C++11)
is_copy_constructible
is_trivially_copy_constructible
is_nothrow_copy_constructible
(C++11)
(C++11)
(C++11)
is_move_constructible
is_trivially_move_constructible
is_nothrow_move_constructible
(C++11)
(C++11)
(C++11)
is_assignable
is_trivially_assignable
is_nothrow_assignable
(C++11)
(C++11)
(C++11)
is_copy_assignable
is_trivially_copy_assignable
is_nothrow_copy_assignable
(C++11)
(C++11)
(C++11)
is_move_assignable
is_trivially_move_assignable
is_nothrow_move_assignable
(C++11)
(C++11)
(C++11)
is_destructible
is_trivially_destructible
is_nothrow_destructible
(C++11)
(C++11)
(C++11)
has_virtual_destructor (C++11)
Les relations et les requêtes de propriété
Original:
Relationships and property queries
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
is_same (C++11)
is_base_of (C++11)
is_convertible (C++11)
alignment_of (C++11)
rank (C++11)
extent (C++11)
Modifications de type
Original:
Type modifications
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remove_cv
remove_const
remove_volatile
(C++11)
(C++11)
(C++11)
add_cv
add_const
add_volatile
(C++11)
(C++11)
(C++11)
make_signed (C++11)
make_unsigned (C++11)
Transformations de type
Original:
Type transformations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
aligned_storage (C++11)
aligned_union (C++11)
decay (C++11)
enable_if (C++11)
conditional (C++11)
common_type (C++11)
underlying_type (C++11)
result_of (C++11)
Tapez constantes traits
Original:
Type trait constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
integral_constant (C++11)
 
 
Déclaré dans l'en-tête <limits>
template<class T >class numeric_limits;
Le modèle de classe numeric_limits fournit un moyen standard pour rechercher des propriétés différentes types fondamentaux (par exemple, la plus grande valeur possible pour le type int est std::numeric_limits<int>::max()) .
Original:
The numeric_limits class template provides a standardized way to query various properties of fundamental types (e.g. the largest possible value for type int is std::numeric_limits<int>::max()).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cette information est fournie par l'intermédiaire des spécialisations du modèle numeric_limits. La bibliothèque standard permet spécialisations disponibles pour tous les types fondamentaux:
Original:
This information is provided via specializations of the numeric_limits template. The standard library makes available specializations for all fundamental types:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Déclaré dans l'en-tête <limits>
template<>class numeric_limits<bool>;

template<>class numeric_limits<char>;
template<>class numeric_limits<signedchar>;
template<>class numeric_limits<unsignedchar>;
template<>class numeric_limits<wchar_t>;
template<>class numeric_limits<char16_t>;   // C++11 feature
template<>class numeric_limits<char32_t>;   // C++11 feature
template<>class numeric_limits<short>;
template<>class numeric_limits<unsignedshort>;
template<>class numeric_limits<int>;
template<>class numeric_limits<unsignedint>;
template<>class numeric_limits<long>;
template<>class numeric_limits<unsignedlong>;
template<>class numeric_limits<longlong>;
template<>class numeric_limits<unsignedlonglong>;
template<>class numeric_limits<float>;
template<>class numeric_limits<double>;

template<>class numeric_limits<longdouble>;
En outre, une spécialisation existe pour chaque version de cv-qualifié de chaque type fondamental, identique à la spécialisation sans réserve, par exemple, std::numeric_limits<const int>, std::numeric_limits<volatile int> et std::numeric_limits<const volatile int> sont fournis et sont équivalentes à std::numeric_limits<int> .
Original:
Additionally, a specialization exists for every cv-qualified version of each fundamental type, identical to the unqualified specialization, e.g. std::numeric_limits<const int>, std::numeric_limits<volatile int>, and std::numeric_limits<const volatile int> are provided and are equivalent to std::numeric_limits<int>.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Les types de bibliothèques standards qui sont des alias des types fondamentaux (tels que std::size_t ou std::streamsize peut également être consulté avec les caractères de std::numeric_limits .
Original:
The standard library types that are aliases of fundamental types (such as std::size_t or std::streamsize may also be examined with the std::numeric_limits type traits.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
implémentations peuvent fournir des spécialisations de std::numeric_limits de mise en œuvre spécifiques aux types: par ex. GCC fournit. std::numeric_limits<__int128> bibliothèques peuvent ajouter des spécialisations pour la bibliothèque fournis par types, par exemple OpenEXR dispose std::numeric_limits<half> pour un 16-bit virgule flottante de type .
Original:
Implementations may provide specializations of std::numeric_limits for implementation-specific types: e.g. GCC provides std::numeric_limits<__int128>. Libraries may add specializations for library-provided types, e.g. OpenEXR provides std::numeric_limits<half> for a 16-bit floating-point type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier]Constantes membres

[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types pour lesquels std::numeric_limits est spécialisée
Original:
identifies types for which std::numeric_limits is specialized
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types signés
Original:
identifies signed types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types entiers
Original:
identifies integer types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types exacts
Original:
identifies exact types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie types à virgule flottante qui peuvent représenter la valeur spéciale "infini positif"
Original:
identifies floating-point types that can represent the special value "positive infinity"
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie types à virgule flottante qui peuvent représenter la valeur spéciale "calme pas-a-number» (NaN)
Original:
identifies floating-point types that can represent the special value "quiet not-a-number" (NaN)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie types à virgule flottante qui peuvent représenter la valeur spéciale "signalisation non-a-number» (NaN)
Original:
identifies floating-point types that can represent the special value "signaling not-a-number" (NaN)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie le style utilisé par la dénormalisation du type à virgule flottante
Original:
identifies the denormalization style used by the floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types à virgule flottante qui détectent une perte de précision que la perte de dénormalisation plutôt que des résultats inexacts
Original:
identifies the floating-point types that detect loss of precision as denormalization loss rather than inexact result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie le type d'arrondi utilisé par le type
Original:
identifies the rounding style used by the type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les IEC 559/IEEE 754 types à virgule flottante
Original:
identifies the IEC 559/IEEE 754 floating-point types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie des types qui représentent un ensemble fini de valeurs
Original:
identifies types that represent a finite set of values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types qui gèrent les débordements avec l'arithmétique modulo
Original:
identifies types that handle overflows with modulo arithmetic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
nombre de chiffres radix qui peuvent être représentées sans changement
Original:
number of radix digits that can be represented without change
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
nombre de chiffres décimaux qui peuvent être représentées sans changement
Original:
number of decimal digits that can be represented without change
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
(C++11)
nombre de chiffres décimaux nécessaires pour différencier les valeurs de ce type
Original:
number of decimal digits necessary to differentiate all values of this type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
la base ou la base utilisée par nombre entier de la représentation du type donné
Original:
the radix or integer base used by the representation of the given type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
un de plus que la plus petite puissance négative de la racine qui est valide normalisé valeur à virgule flottante
Original:
one more than the smallest negative power of the radix that is a valid normalized floating-point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
la plus petite puissance négative de dix qui est valide normalisé valeur à virgule flottante
Original:
the smallest negative power of ten that is a valid normalized floating-point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
un de plus que la plus grande puissance entière de la racine qui est valide finie valeur à virgule flottante
Original:
one more than the largest integer power of the radix that is a valid finite floating-point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
la plus grande puissance entière de 10 qui est valide finie valeur à virgule flottante
Original:
the largest integer power of 10 that is a valid finite floating-point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie les types qui peuvent causer des opérations arithmétiques à piéger
Original:
identifies types which can cause arithmetic operations to trap
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante membre statique publique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
identifie types à virgule flottante qui détectent tinyness avant arrondis
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 membre statique publique)[edit]

[modifier]Fonctions membres

[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie la plus petite valeur finie du type donné
Original:
returns the smallest finite value of the given type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
(C++11)
renvoie la plus petite valeur finie du type donné
Original:
returns the lowest finite value of the given type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie la plus grande valeur finie du type donné
Original:
returns the largest finite value of the given type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie la différence entre 1.0 et la prochaine valeur représentable de la donnée à virgule flottante de type
Original:
returns the difference between 1.0 and the next representable value of the given floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
retourne l'erreur d'arrondi maximum de la donnée à virgule flottante de type
Original:
returns the maximum rounding error of the given floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie la valeur infinie positive de la donnée à virgule flottante de type
Original:
returns the positive infinity value of the given floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie une valeur NaN calme de la donnée à virgule flottante de type
Original:
returns a quiet NaN value of the given floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie une valeur NaN de signalisation de la donnée à virgule flottante de type
Original:
returns a signaling NaN value of the given floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]
[
statique
Original:
static
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
retourne la plus petite valeur positive inférieure à la normale de la donnée à virgule flottante de type
Original:
returns the smallest positive subnormal value of the given floating-point type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique statique)[edit]

[modifier]Classes d'aide

indique modes d'arrondi en virgule flottante
Original:
indicates floating-point rounding modes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum)[edit]
indique les modes de dénormalisation à virgule flottante
Original:
indicates floating-point denormalization modes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum)[edit]

[modifier]Relations avec les constantes C macro bibliothèque

Specialization Members
min()lowest()
(C++11)
max()epsilon()digitsdigits10min_exponentmin_exponent10max_exponentmax_exponent10radix
numeric_limits< bool >2
numeric_limits< char >CHAR_MINCHAR_MINCHAR_MAX2
numeric_limits< signedchar >SCHAR_MINSCHAR_MINSCHAR_MAX2
numeric_limits< unsignedchar >00UCHAR_MAX2
numeric_limits< wchar_t >WCHAR_MINWCHAR_MINWCHAR_MAX2
numeric_limits< char16_t >00UINT_LEAST16_MAX2
numeric_limits< char32_t >00UINT_LEAST32_MAX2
numeric_limits< short >SHRT_MINSHRT_MINSHRT_MAX2
numeric_limits< signedshort >
numeric_limits< unsignedshort >00USHRT_MAX2
numeric_limits< int >INT_MININT_MININT_MAX2
numeric_limits< signedint >
numeric_limits< unsignedint >00UINT_MAX2
numeric_limits< long >LONG_MINLONG_MINLONG_MAX2
numeric_limits< signedlong >
numeric_limits< unsignedlong >00ULONG_MAX2
numeric_limits< longlong >LLONG_MINLLONG_MINLLONG_MAX2
numeric_limits< signedlonglong >
numeric_limits< unsignedlonglong >00ULLONG_MAX2
numeric_limits< float >FLT_MIN-FLT_MAXFLT_MAXFLT_EPSILONFLT_MANT_DIGFLT_DIGFLT_MIN_EXPFLT_MIN_10_EXPFLT_MAX_EXPFLT_MAX_10_EXPFLT_RADIX
numeric_limits< double >DBL_MIN-DBL_MAXDBL_MAXDBL_EPSILONDBL_MANT_DIGDBL_DIGDBL_MIN_EXPDBL_MIN_10_EXPDBL_MAX_EXPDBL_MAX_10_EXPFLT_RADIX
numeric_limits< longdouble >LDBL_MIN-LDBL_MAXLDBL_MAXLDBL_EPSILONLDBL_MANT_DIGLDBL_DIGLDBL_MIN_EXPLDBL_MIN_10_EXPLDBL_MAX_EXPLDBL_MAX_10_EXPFLT_RADIX

[modifier]Exemple

#include <limits>#include <iostream>   int main(){std::cout<<"type\tlowest\thighest\n";std::cout<<"int\t"<< std::numeric_limits<int>::lowest()<<'\t'<< std::numeric_limits<int>::max()<<'\n';std::cout<<"float\t"<< std::numeric_limits<float>::lowest()<<'\t'<< std::numeric_limits<float>::max()<<'\n';std::cout<<"double\t"<< std::numeric_limits<double>::lowest()<<'\t'<< std::numeric_limits<double>::max()<<'\n';}

Résultat possible :

type lowest highest int -2147483648 2147483647 float -3.40282e+38 3.40282e+38 double -1.79769e+308 1.79769e+308
close