Blaze 3.9
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
46namespace blaze {
47
48//=================================================================================================
49//
50// CLASS DEFINITION
51//
52//=================================================================================================
53
54//*************************************************************************************************
90template< typename T1, typename T2 >
92 : public BoolConstant< sizeof(T1) == sizeof(T2) >
93{};
94//*************************************************************************************************
95
96
97//*************************************************************************************************
107template< typename T >
108class HaveSameSize<void,T>
109 : public FalseType
110{};
112//*************************************************************************************************
113
114
115//*************************************************************************************************
125template< typename T >
126class HaveSameSize<T,void>
127 : public FalseType
128{};
130//*************************************************************************************************
131
132
133//*************************************************************************************************
143template<>
144class HaveSameSize<void,void>
145 : public TrueType
146{};
148//*************************************************************************************************
149
150
151//*************************************************************************************************
164template< typename T1, typename T2 >
166//*************************************************************************************************
167
168} // namespace blaze
169
170#endif
Header file for the IntegralConstant class template.
Compile time size check.
Definition: HaveSameSize.h:93
constexpr bool HaveSameSize_v
Auxiliary variable template for the HaveSameSize type trait.
Definition: HaveSameSize.h:165
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74