Поделиться через


numeric_limits::traps

Проверяет, является ли поглощающ, что отчет арифметические исключения реализованы для типа.

static const bool traps = false;

Возвращаемое значение

true если поглощать реализованный для типа; false если объект отсутствует.

Пример

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

using namespace std;

int main( )
{
   cout << "Whether float types have implemented trapping: "
        << numeric_limits<float>::traps
        << endl;
   cout << "Whether double types have implemented trapping: "
        << numeric_limits<double>::traps
        << endl;
   cout << "Whether long int types have implemented trapping: "
        << numeric_limits<long int>::traps
        << endl;
   cout << "Whether unsigned char types have implemented trapping: "
        << numeric_limits<unsigned char>::traps
        << endl;
}
  

Требования

заголовок: <limits>

std пространство имен:

См. также

Ссылки

strstreambuf Class