numeric_limits::is_specialized

型は、テンプレート クラス numeric_limitsで定義されている明示的な特殊化テストがある場合。

static const bool is_specialized = false;

戻り値

型にテンプレート クラスで定義されている明示的な特化がある場合true ; false それ以外の場合は。

解説

ポインター以外のすべてのスカラー型は、テンプレート クラス numeric_limitsに対して定義された明示的な特化があります。

使用例

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

using namespace std;

int main( )
{
   cout << "Whether float objects have an explicit "
        << "specialization in the class: "
        << numeric_limits<float>::is_specialized
        << endl;
   cout << "Whether float* objects have an explicit "
        << "specialization in the class: "
        << numeric_limits<float*>::is_specialized
        << endl;
   cout << "Whether int objects have an explicit "
        << "specialization in the class: "
        << numeric_limits<int>::is_specialized
        << endl;
   cout << "Whether int* objects have an explicit "
        << "specialization in the class: "
        << numeric_limits<int*>::is_specialized
        << endl;
}
  

必要条件

ヘッダー: <limits>

名前空間: std

参照

関連項目

strstreambuf Class