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>| Definido no cabeçalho <locale>
|
||
static locale global( const locale& loc ); |
||
Substitui o mundial C + + localidade com
loc, o que significa que todas as chamadas futuras para o construtor padrão std::locale agora irá retornar uma cópia do loc. Se loc tem um nome, também substitui a localidade C, como se por std::setlocale(LC_ALL, loc.name().c_str());. Esta função é a única forma de alterar o global C + + local, o que é de outro modo equivalentes às std::locale::classic() na inicialização do programa.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.
Parâmetros
| loc | - | o global novo C + + localidade
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. |
Valor de retorno
O valor anterior do global 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.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
Veja também
constrói uma nova localidade 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. (função pública membro) | |
[estática] |
obtém-se uma referência ao local "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. (função public static membro) |
obtém e define a localidade C atual 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. (função) | |