All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GetMemberType.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPETRAITS_GETMEMBERTYPE_H_
36 #define _BLAZE_UTIL_TYPETRAITS_GETMEMBERTYPE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/mpl/If.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // MACRO DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
95 #define BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT( TYPE_TRAIT_NAME, MEMBER_NAME, FALLBACK_TYPE ) \
96  \
97 template< typename Type1233 > \
98 struct TYPE_TRAIT_NAME \
99 { \
100  private: \
101  struct SUCCESS { typedef typename Type1233::MEMBER_NAME Type; }; \
102  struct FAILURE { typedef FALLBACK_TYPE Type; }; \
103  \
104  BLAZE_CREATE_HAS_TYPE_MEMBER_TYPE_TRAIT( LOCAL_TYPE_TRAIT, MEMBER_NAME ); \
105  \
106  public: \
107  typedef typename blaze::If< LOCAL_TYPE_TRAIT<Type1233> \
108  , SUCCESS \
109  , FAILURE \
110  >::Type::Type Type; \
111 };
112 //*************************************************************************************************
113 
114 } // namespace blaze
115 
116 #endif
Header file for the If class template.
Header file for the HasMember type traits.