std::locale::combine
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <locale>
|
||
template< class Facet > locale combine( const locale& other ) const; |
||
Costruisce un oggetto locale, che è una copia di
*this tranne che per l'aspetto di Facet tipo, che viene copiato dal other.Original:
Constructs a locale object which is a copy of
*this except for the facet of type Facet, which is copied from other.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.
Valore di ritorno
Il nuovo, senza nome, locale.
Original:
The new, nameless, 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.
Eccezioni
std::runtime_error
other se non Facet attuareOriginal:
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.
Esempio
#include <iostream>
#include <locale>
int main()
{
const double number = 1000.25;
std::cout << "\"C\" locale: " << number << '\n';
std::locale loc = std::locale().combine<std::numpunct<char>>(std::locale("en_US.UTF8"));
std::cout.imbue(loc);
std::cout << "\"C\" locale with en_US numpunct: " << number << '\n';
}
Output:
"C" locale: 1000.25
"C" locale with en_US numpunct: 1,000.25
Vedi anche
costruisce un nuovo locale 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. (metodo pubblico) | |