std::locale::global
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Déclaré dans l'en-tête <locale>
|
||
static locale global( const locale& loc ); |
||
Remplace le monde C + + avec
loc locale, ce qui signifie que tous les appels futurs à le constructeur par défaut std::locale vont désormais retourner une copie de loc. Si loc a un nom, remplace aussi la locale C comme par std::setlocale(LC_ALL, loc.name().c_str());. Cette fonction est la seule façon de modifier le global C + + locale, qui est par ailleurs équivalents à std::locale::classic() au démarrage du programme .Original:
Replaces the global C++ locale with
loc, which means all future calls to the std::locale default constructor will now return a copy of loc. If loc has a name, also replaces the C locale as if by std::setlocale(LC_ALL, loc.name().c_str());. This function is the only way to modify the global C++ locale, which is otherwise equivalent to std::locale::classic() at program startup.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.
Paramètres
| loc | - | le nouveau monde C + + locale
Original: the new global C++ locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
La valeur précédente du monde C + + locale .
Original:
The previous value of the global C++ locale.
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.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
construit un nouveau local Original: constructs a new locale 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 ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
obtient une référence à la localisation "C" Original: obtains a reference to the "C" locale 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) |
obtient et définit les paramètres régionaux actuels C Original: gets and sets the current C locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |