codecvt::always_noconv
public member function
int always_noconv() const throw();
Return noconv characteristics
Returns whether a conversion between the internal and external types will yield a copy without any real conversion (either a translation or a type casting).
If this function returns true for a particular type of codecvt, then its members codecvt::in and codecvt::out will always return codecvt::noconv.
During its operation, this function simply calls the virtual protected member codecvt::do_always_noconv, which is the member function in charge of performing the actions described above.
Parameters
none
Return value
true if codecvt::in and codecvt::out will always result in codecvt::noconv.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
// codecvt::always_noconv example
#include <iostream>
#include <locale>
using namespace std;
int main ()
{
locale loc;
cout << "always_noconv for codecvt<char,char,mbstate_t>: ";
cout << use_facet<codecvt<char,char,mbstate_t> >(loc).always_noconv();
cout << endl;
cout << "always_noconv for codecvt<wchar_t,char,mbstate_t>: ";
cout << use_facet<codecvt<wchar_t,char,mbstate_t> >(loc).always_noconv();
cout << endl;
return 0;
}
|
Output:
always_noconv for codecvt<char,char,mbstate_t>: 1
always_noconv for codecvt<wchar_t,char,mbstate_t>: 0
|
See also
codecvt::in | Translate in characters (public member function) |
codecvt::out | Translate out characters (public member function) |
|