Sdílet prostřednictvím


is_arithmetic – třída

Zkoušky, pokud je typ aritmetických operací.

template<class Ty>
    struct is_arithmetic;

Parametry

  • Ty
    Typ dotazu.

Poznámky

Instance typu predikát obsahuje true Pokud typ Ty aritmetické typu, integrálního typu nebo plovoucí bod typu, nebo cv-qualified forma, jedna z nich, jinak má hodnotu false.

Příklad

 

// std_tr1__type_traits__is_arithmetic.cpp 
// compile with: /EHsc 
#include <type_traits> 
#include <iostream> 
 
struct trivial 
    { 
    int val; 
    }; 
 
int main() 
    { 
    std::cout << "is_arithmetic<trivial> == " << std::boolalpha 
        << std::is_arithmetic<trivial>::value << std::endl; 
    std::cout << "is_arithmetic<int> == " << std::boolalpha 
        << std::is_arithmetic<int>::value << std::endl; 
    std::cout << "is_arithmetic<float> == " << std::boolalpha 
        << std::is_arithmetic<float>::value << std::endl; 
 
    return (0); 
    } 
 
  

Požadavky

Záhlaví: <type_traits>

Obor názvů: std

Viz také

Referenční dokumentace

<type_traits>

is_floating_point – třída

is_integral – třída

Další zdroje

<type_traits> Členové