std::codecvt::always_noconv, std::codecvt::do_always_noconv
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>
|
||
public: bool always_noconv() const |
(1) | |
protected: bool do_max_length() const |
(2) | |
1)
öffentliche Member-Funktion ruft die Member-Funktion
do_always_noconv der am meisten abgeleiteten Klasse .Original:
public member function, calls the member function
do_always_noconv of the most derived class.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.
2)
kehrt
true wenn beide do_in() und do_out() Rückkehr std::codecvt_base::noconv für alle gültigen Eingaben .Original:
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
true, wenn diese Umwandlung Facette führt keine Umbauten, false sonst .Original:
true if this conversion facet performs no conversions, false otherwise.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.
Die nicht-Converting-Spezialisierung
std::codecvt<char, char, std::mbstate_t> kehrt trueOriginal:
The non-converting specialization
std::codecvt<char, char, std::mbstate_t> returns trueThe 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.
Notes
Diese Funktion kann z. B. bei der Umsetzung der
std::basic_filebuf::underflow verwendet werden, um lose Charakter copy anstelle von Aufrufen std::codecvt::in wenn bekannt ist, dass die Länderkennung in der std::basic_filebuf durchdrungen führt keine Umbauten .Original:
This function may be used e.g. in the implementation of
std::basic_filebuf::underflow to use bulk character copy instead of calling std::codecvt::in if it is known that the locale imbued in the std::basic_filebuf does not perform any conversions.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
Beispiel
#include <locale>
#include <iostream>
int main()
{
std::cout << "The non-converting char<->char codecvt::always_noconv() returns "
<< std::boolalpha
<< std::use_facet<std::codecvt<char, char, std::mbstate_t>>(
std::locale()
).always_noconv() << "\n"
<< "while wchar_t<->char codecvt::always_noconv() returns "
<< std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t>>(
std::locale()
).always_noconv() << "\n";
}
Output:
The non-converting char<->char codecvt::always_noconv() returns true
while wchar_t<->char codecvt::always_noconv() returns false