共用方式為


numeric_limits::is_signed

測試,如果型別具有簽章的表示。

static const bool is_signed = false;

傳回值

true ,如果型別有已簽署的表示; false

備註

這個成員儲存適用於有已簽署的表示法,為浮點所有的預先定義的帶正負號的整數類資料型別之項目的型別。

範例

// numeric_limits_is_signaled.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>

using namespace std;

int main( )
{
   cout << "Whether float objects have a signed representation: "
        << numeric_limits<float>::is_signed
        << endl;
   cout << "Whether double objects have a signed representation: "
        << numeric_limits<double>::is_signed
        << endl;
   cout << "Whether signed char objects have a signed representation: "
        << numeric_limits<signed char>::is_signed
        << endl;
   cout << "Whether unsigned char objects have a signed representation: "
        << numeric_limits<unsigned char>::is_signed
        << endl;
}
  

需求

標題: <。>

命名空間: std

請參閱

參考

strstreambuf 類別