std::codecvt::always_noconv, std::codecvt::do_always_noconv
De cppreference.com
(Redirecionado de cpp/locale/codecvt/do always noconv)
|
|
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>| Definido no cabeçalho <locale>
|
||
public: bool always_noconv() const |
(1) | |
protected: bool do_max_length() const |
(2) | |
1)
função de membro público, chama a
do_always_noconv função de membro da classe derivada mais.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 se ambos do_in() e do_out() std::codecvt_base::noconv retorno para todas as 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 se esta faceta conversão realiza nenhuma conversão, false outra forma.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.
A especialização não-conversão
std::codecvt<char, char, std::mbstate_t> retornos 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 função pode ser usada por exemplo na implementação de
std::basic_filebuf::underflow usar cópia caráter granel em vez de chamar std::codecvt::in se é sabido que o local imbuída no std::basic_filebuf não executa quaisquer conversões.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.
Exceções
Exemplo
#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";
}
Saída:
The non-converting char<->char codecvt::always_noconv() returns true
while wchar_t<->char codecvt::always_noconv() returns false