次の方法で共有


codecvt::always_noconv

変換がする必要がないかどうかをテストします。

bool always_noconv( ) const throw( );

戻り値

変換がする必要がある true であるブール値; false は、少なくとも 1 する必要があります。

解説

このメンバー関数は do_always_noconvを返します。

使用例

// 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;
}
  
  

必要条件

ヘッダー: <locale>

名前空間: std

参照

関連項目

codecvt Class