Blaze  3.6
HaveSameSize.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_HAVESAMESIZE_H_
36 #define _BLAZE_UTIL_TYPETRAITS_HAVESAMESIZE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
90 template< typename T1, typename T2 >
92  : public BoolConstant< sizeof(T1) == sizeof(T2) >
93 {};
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
107 template< typename T >
108 class HaveSameSize<void,T>
109  : public FalseType
110 {};
112 //*************************************************************************************************
113 
114 
115 //*************************************************************************************************
125 template< typename T >
126 class HaveSameSize<T,void>
127  : public FalseType
128 {};
130 //*************************************************************************************************
131 
132 
133 //*************************************************************************************************
143 template<>
144 class HaveSameSize<void,void>
145  : public TrueType
146 {};
148 //*************************************************************************************************
149 
150 
151 //*************************************************************************************************
164 template< typename T1, typename T2 >
166 //*************************************************************************************************
167 
168 } // namespace blaze
169 
170 #endif
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: IntegralConstant.h:121
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
constexpr bool HaveSameSize_v
Auxiliary variable template for the HaveSameSize type trait.The HaveSameSize_v variable template prov...
Definition: HaveSameSize.h:165
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time size check.This class offers the possibility to test the size of two types at compile ti...
Definition: HaveSameSize.h:91
Header file for the IntegralConstant class template.