blaze::Has2Bytes< T > Struct Template Reference

Compile time size check.This type trait offers the possibility to test whether a given type has a size of exactly two bytes. If the type T has two bytes, 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::HasSize< T, 2UL >.

Detailed Description

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

Compile time size check.

This type trait offers the possibility to test whether a given type has a size of exactly two bytes. If the type T has two bytes, 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::Has2Bytes<const short>::value // Evaluates to 'true' (on most architectures)
blaze::Has2Bytes<unsigned short>::Type // Results in TrueType (on most architectures)
blaze::Has2Bytes<volatile short> // Is derived from TrueType (on most architectures)
blaze::Has2Bytes<const float>::Type // Results in FalseType
blaze::Has2Bytes<unsigned int> // Is derived from FalseType

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