Blaze 3.9
IsPaddingEnabled.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_ISPADDINGENABLED_H_
36#define _BLAZE_MATH_TYPETRAITS_ISPADDINGENABLED_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// CLASS DEFINITION
53//
54//=================================================================================================
55
56//*************************************************************************************************
61BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT( IsPaddingEnabledHelper1, paddingEnabled );
63//*************************************************************************************************
64
65
66//*************************************************************************************************
71template< typename T >
72struct IsPaddingEnabledHelper2 {
73 static constexpr bool test( bool (*fnc)() ) { return fnc(); }
74 static constexpr bool test( bool b ) { return b; }
75 static constexpr bool value = test( T::paddingEnabled );
76};
78//*************************************************************************************************
79
80
81//*************************************************************************************************
108template< typename T >
110 : public BoolConstant< If_t< IsPaddingEnabledHelper1_v<T>
111 , IsPaddingEnabledHelper2<T>
112 , AlwaysFalse<T> >::value >
113{};
114//*************************************************************************************************
115
116
117//*************************************************************************************************
130template< typename T >
132//*************************************************************************************************
133
134} // namespace blaze
135
136#endif
Header file for the AlwaysFalse type trait.
Header file for the HasMember type traits.
Header file for the IntegralConstant class template.
constexpr bool IsPaddingEnabled_v
Auxiliary variable template for the IsPaddingEnabled type trait.
Definition: IsPaddingEnabled.h:131
#define BLAZE_CREATE_HAS_DATA_OR_FUNCTION_MEMBER_TYPE_TRAIT(TYPE_TRAIT_NAME, MEMBER_NAME)
Macro for the creation of a type trait for compile time checks for member data and functions.
Definition: HasMember.h:99
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
Compile time check for data types.
Definition: IsPaddingEnabled.h:113