std::codecvt::always_noconv, std::codecvt::do_always_noconv
De cppreference.com
(Redirigido desde «cpp/locale/codecvt/do always noconv»)
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
| Definido en el archivo de encabezado <locale>
|
||
public:
bool always_noconv() const
|
(1) | |
protected:
bool do_max_length() const
|
(2) | |
1)
función miembro pública, llama a la función
do_always_noconv miembro de la clase más derivada .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)
retornos
true si tanto do_in() y do_out() retorno std::codecvt_base::noconv para todas las entradas válidas .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.
Valor de retorno
true si esta faceta de conversión realiza ninguna conversión, false lo contrario .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.
La especialización no convertir
std::codecvt<char, char, std::mbstate_t> vuelve 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.
Notas
Esta función puede utilizarse, por ejemplo en la aplicación de
std::basic_filebuf::underflow utilizar copia carácter grueso en lugar de llamar std::codecvt::in si se sabe que la configuración regional imbuida en la std::basic_filebuf no realiza ninguna conversión .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.
Excepciones
Ejemplo
Ejecuta este código
#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";
}
Salida:
The non-converting char<->char codecvt::always_noconv() returns true
while wchar_t<->char codecvt::always_noconv() returns false