blaze::IsNumeric< T > Struct Template Reference

Compile time check for numeric types.This type trait tests whether or not the given template parameter is a numeric data type. Blaze considers all integral (except bool), floating point, and complex data types as numeric data types. In case the type is a numeric type, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType. More...

#include <IsNumeric.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

template<typename T>
struct blaze::IsNumeric< T >

Compile time check for numeric types.

This type trait tests whether or not the given template parameter is a numeric data type. Blaze considers all integral (except bool), floating point, and complex data types as numeric data types. In case the type is a numeric type, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.

blaze::IsNumeric<int>::value // Evaluates to 'true' (int is a numeric data type)
blaze::IsNumeric<const double>::Type // Results in TrueType (float is a numeric data type)
blaze::IsNumeric<volatile complex<float> > // Is derived from TrueType (complex<float> is a numeric data type)
blaze::IsNumeric<void>::value // Evaluates to 'false' (void is not a numeric data type)
blaze::IsNumeric<bool>::Type // Results in FalseType (bool is not a numeric data type)
blaze::IsNumeric<const bool> // Is derived from FalseType

The documentation for this struct was generated from the following file: