IsSame.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_ISSAME_H_
36 #define _BLAZE_UTIL_TYPETRAITS_ISSAME_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/FalseType.h>
45 #include <blaze/util/TrueType.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
76 template< typename A, typename B >
78  : public FalseType
79 {};
80 //*************************************************************************************************
81 
82 
83 //*************************************************************************************************
85 template< typename T >
87 struct IsStrictlySame<T,T>
88  : public TrueType
89 {};
91 //*************************************************************************************************
92 
93 
94 
95 
96 //=================================================================================================
97 //
98 // CLASS DEFINITION
99 //
100 //=================================================================================================
101 
102 //*************************************************************************************************
107 template< typename A, typename B >
108 struct IsSameHelper
109 {
110  public:
111  //**********************************************************************************************
112  enum : bool { value = IsStrictlySame< RemoveCV_<A>, RemoveCV_<B> >::value };
113  //**********************************************************************************************
114 };
116 //*************************************************************************************************
117 
118 
119 //*************************************************************************************************
139 template< typename A, typename B >
140 struct IsSame
141  : public BoolConstant< IsSameHelper<A,B>::value >
142 {};
143 //*************************************************************************************************
144 
145 } // namespace blaze
146 
147 #endif
typename RemoveCV< T >::Type RemoveCV_
Auxiliary alias declaration for the RemoveCV type trait.The RemoveCV_ alias declaration provides a co...
Definition: RemoveCV.h:97
Header file for the FalseType type/value trait base class.
Header file for the RemoveCV type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then 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.
Definition: IsSame.h:140
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time type relationship analysis.This class tests if the two data types A and B are equal...
Definition: IsSame.h:77
Header file for the IntegralConstant class template.
Header file for the TrueType type/value trait base class.