EraseAll.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPELIST_ERASEALL_H_
36 #define _BLAZE_UTIL_TYPELIST_ERASEALL_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
72 template< typename TL // Type of the type list
73  , typename T > // The type to be erased from the type list
74 struct EraseAll;
75 //*************************************************************************************************
76 
77 
78 //*************************************************************************************************
83 template< typename T > // The type to be erased from the type list
84 struct EraseAll< TypeList<>, T >
85 {
86  using Type = TypeList<>;
87 };
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
97 template< typename T // The type to be erased from the type list
98  , typename... Ts > // Type of the tail of the type list
99 struct EraseAll< TypeList<T,Ts...>, T >
100 {
101  using Type = typename EraseAll< TypeList<Ts...>, T >::Type;
102 };
104 //*************************************************************************************************
105 
106 
107 //*************************************************************************************************
112 template< typename U // Type of the head of the type list
113  , typename... Ts // Types of the tail of the type list
114  , typename T > // The search type
115 struct EraseAll< TypeList<U,Ts...>, T >
116 {
117  using Type = typename Append< TypeList<U>, typename EraseAll< TypeList<Ts...>, T >::Type >::Type;
118 };
120 //*************************************************************************************************
121 
122 } // namespace blaze
123 
124 #endif
Appending a type to a type list.The Append class can be used to append the data type T to a type list...
Definition: Append.h:69
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Implementation of a type list.The TypeList class template represents a list of data types of arbitrar...
Definition: TypeList.h:119
Erasing all occurrences of a type from a type list.The EraseAll class can be used to erase all occurr...
Definition: EraseAll.h:74
Header file for the TypeList class template.
Header file for the Append class template.