Compartilhar via


codecvt::always_noconv

Tests whether no conversions need be done.

bool always_noconv( ) const throw( );

Return Value

A Boolean value that is true if no conversions need be done; false is at least one needs to be done.

Remarks

The member function returns do_always_noconv.

Example

// codecvt_always_noconv.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
using namespace std;

int main( )   
{
   locale loc ( "German_Germany" );
   bool result1 = use_facet<codecvt<char, char, mbstate_t> > 
      ( loc ).always_noconv( );

   if ( result1 )
      cout << "No conversion is needed." << endl;
   else
      cout << "At least one conversion is required." << endl;

   bool result2 = use_facet<codecvt<wchar_t, char, mbstate_t> > 
      ( loc ).always_noconv( );
   
   if ( result2 )
      cout << "No conversion is needed." << endl;
   else
      cout << "At least one conversion is required." << endl;
}
No conversion is needed.
At least one conversion is required.

Requirements

Header: <locale>

Namespace: std

See Also

Reference

codecvt Class

Other Resources

codecvt Members