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 enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...

#include <IsNumeric.h>

Inherits Type< T >.

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 enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.

blaze::IsNumeric<int>::value // Evaluates to 1 (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 0 (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: