Namensräume
Varianten

std::has_facet

Aus cppreference.com

<metanoindex/>

 
 
Lokalisierungen Bibliothek
Locales und Facetten
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
Buchstaben-Klassifikation
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.
Facet Kategorie Basisklassen
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.
Facet Kategorien
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.
Locale-spezifische Facetten
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.
Code-Konvertierung Facetten
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>
definiert in Header <locale>
template< class Facet > bool has_facet( const locale& loc );
Prüft, ob die locale loc implementiert die Facette Facet .
Original:
Checks if the locale loc implements the facet Facet.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parameter

loc -
das Gebietsschema Objekt abzufragen
Original:
the locale object to query
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Rückgabewert

Versandkosten true, wenn die Facette Facet in der locale installiert wurde loc, false sonst .
Original:
Returns true if the facet Facet was installed in the locale loc, false otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Exception-Spezifikation

noexcept specification:  
<tbody> </tbody>
noexcept
  (seit C++11)

Beispiel

#include <iostream>
#include <locale>
// minimal custom facet
struct myfacet : public std::locale::facet {
    static std::locale::id id;
};
std::locale::id myfacet::id;
int main()
{
    // loc is a "C" locale with myfacet added
    std::locale loc(std::locale::classic(), new myfacet);
    std::cout << std::boolalpha
              << "Can loc classify chars? "
              << std::has_facet<std::ctype<char>>(loc) << '\n'
              << "Can loc classify char32_t? "
              << std::has_facet<std::ctype<char32_t>>(loc) << '\n'
              << "Does loc implement myfacet? "
              << std::has_facet<myfacet>(loc) << '\n';
}

Output:

Can loc classify chars? true
Can loc classify char32_t? false
Does loc implement myfacet? true

Siehe auch

eingestellt von polymorphen Facetten, die kulturellen Unterschiede zu kapseln
Original:
set of polymorphic facets that encapsulate cultural differences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Klasse) [edit]
erhält eine Facette von einem locale
Original:
obtains a facet from a locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktions-Template) [edit]
Morty Proxy This is a proxified and sanitized view of the page, visit original site.