std::codecvt::always_noconv, std::codecvt::do_always_noconv
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <locale>
|
||
public: bool always_noconv() const |
(1) | |
protected: bool do_max_length() const |
(2) | |
1)
funzione membro pubblica, chiama la
do_always_noconv funzione membro della classe più derivata.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)
torna
true se sia do_in() e do_out() ritorno std::codecvt_base::noconv per tutti gli ingressi validi.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.
Valore di ritorno
true se questo aspetto di conversione esegue nessuna conversione, false altrimenti.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 mancata conversione di specializzazione
std::codecvt<char, char, std::mbstate_t> rendimenti 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.
Note
Questa funzione può essere utilizzata ad esempio per l'attuazione di
std::basic_filebuf::underflow di utilizzare la copia bulk carattere invece di chiamare std::codecvt::in se è noto che il locale imbevuto nel std::basic_filebuf non esegue alcuna conversione.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.
Eccezioni
Esempio
#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