Blaze  3.6
blaze::IsConst< T > Struct Template Reference

Compile time check for constant data types.The IsConst type trait tests whether or not the given template parameter is a (top level) const-qualified data type. In case the given data type is const-qualified, 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 <IsConst.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

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

Compile time check for constant data types.

The IsConst type trait tests whether or not the given template parameter is a (top level) const-qualified data type. In case the given data type is const-qualified, 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::IsConst<const int>::value // Evaluates to 'true'
blaze::IsConst<int* const> // Is derived from TrueType
blaze::IsConst<int>::value // Evaluates to 'false'
blaze::IsConst<const int*>::Type // Results in FalseType (the const-qualifier is not at the top level)
blaze::IsConst<const int* volatile> // Is derived from FalseType

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