Espaces de noms
Variantes

std::moneypunct_byname

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, bool Intl = false > class moneypunct_byname : public std::moneypunct<charT, Intl>;
std::moneypunct_byname est une facette std::moneypunct qui encapsule les préférences de formatage monétaires d'une variable locale spécifiée lors de sa construction .
Original:
std::moneypunct_byname is a std::moneypunct facet which encapsulates monetary formatting preferences of a locale specified at its construction.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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::moneypunct_byname<char, Intl>
spécifique aux paramètres régionaux pour la facette std::moneypunct caractère étroit I / O
Original:
locale-specific std::moneypunct facet for narrow character I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::moneypunct_byname<wchar_t, Intl>
spécifique aux paramètres régionaux facette std::moneypunct pour les caractères larges I / O
Original:
locale-specific std::moneypunct facet for wide character I/O
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
pattern std::money_base::pattern
string_type std::basic_string<charT>

Fonctions membres

construit un nouveau moneypunct_byname facette
Original:
constructs a new moneypunct_byname 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)
Détruit une facette moneypunct_byname
Original:
destructs a moneypunct_byname 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)

Exemple

Cet exemple demonistrates comment appliquer les règles de mise en forme monétaire d'une autre langue sans changer le reste de la localisation .
Original:
This example demonistrates how to apply monetary formatting rules of another language without changing the rest 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.

#include <iostream>
#include <iomanip>
#include <locale>
int main()
{
    long double mon = 1234567;
    std::locale::global(std::locale("en_US.utf8"));
    std::wcout.imbue(std::locale());
    std::wcout << L"american locale : " << std::showbase
               << std::put_money(mon) << '\n';
    std::wcout.imbue(std::locale(std::wcout.getloc(),
                                 new std::moneypunct_byname<wchar_t>("ru_RU.utf8")));
    std::wcout << L"american locale with russian moneypunct: "
               << std::put_money(mon) << '\n';
}

Résultat :

american locale : $12,345.67
american locale with russian moneypunct: 12 345.67 руб

Voir aussi

définit les paramètres de mise en forme monétaire utilisés par std::money_get et std::money_put
Original:
defines monetary formatting parameters used by std::money_get and std::money_put
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) [edit]