Blaze  3.6
IsValid.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_ISVALID_H_
36 #define _BLAZE_UTIL_TYPETRAITS_ISVALID_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/util/InvalidType.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
74 template< typename T >
75 struct IsValid
76  : public TrueType
77 {};
78 //*************************************************************************************************
79 
80 
81 //*************************************************************************************************
83 template<>
85 struct IsValid<INVALID_TYPE>
86  : public FalseType
87 {};
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
94 template<>
96 struct IsValid<const INVALID_TYPE>
97  : public FalseType
98 {};
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
105 template<>
107 struct IsValid<volatile INVALID_TYPE>
108  : public FalseType
109 {};
111 //*************************************************************************************************
112 
113 
114 //*************************************************************************************************
116 template<>
118 struct IsValid<const volatile INVALID_TYPE>
119  : public FalseType
120 {};
122 //*************************************************************************************************
123 
124 
125 //*************************************************************************************************
138 template< typename T >
139 constexpr bool IsValid_v = IsValid<T>::value;
140 //*************************************************************************************************
141 
142 } // namespace blaze
143 
144 #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
constexpr bool IsValid_v
Auxiliary variable template for the IsValid type trait.The IsValid_v variable template provides a con...
Definition: IsValid.h:139
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Utility type for generic codes.
Header file for the IntegralConstant class template.
Compile time type check.This class tests whether the given template parameter is a valid or invalid d...
Definition: IsValid.h:75