Espaces de noms
Variantes

std::numpunct

De cppreference.com

<metanoindex/>

 
 
Bibliothèque localisations
Locales et facettes
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
Classification des caractères
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversions
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes de facettes catégorie de base
Original:
Facet category base classes
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 facettes
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Spécifique aux paramètres régionaux facettes
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facettes de conversion de code
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8 (C++11)
codecvt_utf16 (C++11)
C locale
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
 
<tbody> </tbody>
Déclaré dans l'en-tête <locale>
template< class CharT > class numpunct;
Le std::numpunct facette encapsule les préférences de ponctuation numériques. Flux d'E / S opérations utilisent std::numpunct par std::num_get et std::num_put pour analyser l'entrée numérique et une sortie mise en forme numérique .
Original:
The facet std::numpunct encapsulates numeric punctuation preferences. Stream I/O operations use std::numpunct through std::num_get and std::num_put for parsing numeric input and formatting numeric output.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/locale/facet

Inheritance diagram

Deux spécialisations sont fournis par la bibliothèque standard
Original:
Two specializations are provided by the standard library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <locale>
std::numpunct<char>
fournit des équivalents des préférences "C"
Original:
provides equivalents of the "C" locale preferences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::numpunct<wchar_t>
fournit des équivalents de caractères étendus des préférences "C"
Original:
provides wide character equivalents of the "C" locale preferences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Types de membres

Type du membre Définition
char_type charT
string_type std::basic_string<charT>

Fonctions membres

Modèle:cpp/locale/numpunct/dsc truenameModèle:cpp/locale/numpunct/dsc falsename
construit un nouveau numpunct facette
Original:
constructs a new numpunct facet
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) [edit]
Détruit une facette numpunct
Original:
destructs a numpunct facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre protégée) [edit]
Invoque do_decimal_point
Original:
invokes do_decimal_point
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) [edit]
Invoque do_thousands_sep
Original:
invokes do_thousands_sep
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) [edit]
Invoque do_grouping
Original:
invokes do_grouping
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) [edit]

Protégé fonctions membres

Modèle:cpp/locale/numpunct/dsc do truenameModèle:cpp/locale/numpunct/dsc do falsename
[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
fournit le caractère à utiliser comme séparateur décimal
Original:
provides the character to use as decimal point
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre virtuelle protégée) [edit]
[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
fournit le caractère à utiliser comme séparateur de milliers
Original:
provides the character to use as thousands separator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre virtuelle protégée) [edit]
[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
indique le nombre de chiffres entre chaque paire de milliers séparateurs
Original:
provides the numbers of digits between each pair of thousands separators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre virtuelle protégée) [edit]

Objets membres

static std::locale::id id
Id de la localisation
Original:
id of the locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(objet membre public)

Exemple

L'exemple suivant modifie les représentations de chaîne de true et false
Original:
The following example changes the string representations of true and false
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

#include <iostream>
#include <locale>

struct french_bool : std::numpunct<char> {
    string_type do_truename() const { return "oui"; }
    string_type do_falsename() const { return "non"; }
};

int main()
{
    std::cout << "default locale: "
              << std::boolalpha << true << ", " << false << '\n';
    std::cout.imbue(std::locale(std::cout.getloc(), new french_bool()));
    std::cout << "locale with modified numpunct: "
              << std::boolalpha << true << ", " << false << '\n';
}

Résultat :

default locale: true, false
locale with modified numpunct: oui, non

Voir aussi

crée une facette numpunct pour l'environnement local nommé
Original:
creates a numpunct facet for the named locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)