blaze::HasSize< T, Size > Struct Template Reference

Compile time size check.This class offers the possibility to test the size of a type at compile time. If the type T is exactly Size bytes large, 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 <HasSize.h>

Inherits blaze::IntegralConstant< T, N >.

Detailed Description

template<typename T, size_t Size>
struct blaze::HasSize< T, Size >

Compile time size check.

This class offers the possibility to test the size of a type at compile time. If the type T is exactly Size bytes large, 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::HasSize<int,4>::value // Evaluates to 'true' (on most architectures)
blaze::HasSize<float,4>::Type // Results in TrueType (on most architectures)
blaze::HasSize<const double,8> // Is derived from TrueType (on most architectures)
blaze::HasSize<const char,8>::Type // Results in FalseType
blaze::HasSize<unsigned char,4> // Is derived from FalseType

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