std::locale::combine
Aus 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>| definiert in Header <locale>
|
||
template< class Facet > locale combine( const locale& other ) const; |
||
Konstruiert eine locale Objekt, das eine Kopie des
*this Ausnahme der Facette des Typs Facet, die von other kopiert ist .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.
Rückgabewert
Die neue, namenlose, 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.
Ausnahmen
std::runtime_error wenn
other nicht implementiert FacetOriginal:
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.
Beispiel
#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
Siehe auch
baut eine neue 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. (öffentliche Elementfunktion) | |