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 >
77 struct IsStrictlySame : public FalseType
78 {};
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
84 template< typename T >
86 struct IsStrictlySame<T,T> : public TrueType
87 {};
89 //*************************************************************************************************
90 
91 
92 
93 
94 //=================================================================================================
95 //
96 // CLASS DEFINITION
97 //
98 //=================================================================================================
99 
100 //*************************************************************************************************
105 template< typename A, typename B >
106 struct IsSameHelper
107 {
108  public:
109  //**********************************************************************************************
110  enum : bool { value = IsStrictlySame< RemoveCV_<A>, RemoveCV_<B> >::value };
111  //**********************************************************************************************
112 };
114 //*************************************************************************************************
115 
116 
117 //*************************************************************************************************
137 template< typename A, typename B >
138 struct IsSame : public BoolConstant< IsSameHelper<A,B>::value >
139 {};
140 //*************************************************************************************************
141 
142 } // namespace blaze
143 
144 #endif
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:138
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.