Blaze 3.9
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
47namespace blaze {
48
49//=================================================================================================
50//
51// CLASS DEFINITION
52//
53//=================================================================================================
54
55//*************************************************************************************************
72template< typename TL // Type of the type list
73 , typename T > // The type to be erased from the type list
74struct EraseAll;
75//*************************************************************************************************
76
77
78//*************************************************************************************************
83template< typename T > // The type to be erased from the type list
84struct EraseAll< TypeList<>, T >
85{
86 using Type = TypeList<>;
87};
89//*************************************************************************************************
90
91
92//*************************************************************************************************
97template< typename T // The type to be erased from the type list
98 , typename... Ts > // Type of the tail of the type list
99struct EraseAll< TypeList<T,Ts...>, T >
100{
101 using Type = typename EraseAll< TypeList<Ts...>, T >::Type;
102};
104//*************************************************************************************************
105
106
107//*************************************************************************************************
112template< 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
115struct EraseAll< TypeList<U,Ts...>, T >
116{
117 using Type = typename Append< TypeList<U>, typename EraseAll< TypeList<Ts...>, T >::Type >::Type;
118};
120//*************************************************************************************************
121
122
123//*************************************************************************************************
136template< typename TL // Type of the type list
137 , typename T > // The type to be erased from the type list
139//*************************************************************************************************
140
141} // namespace blaze
142
143#endif
Header file for the Append class template.
typename EraseAll< TL, T >::Type EraseAll_t
Auxiliary alias declaration for the EraseAll class template.
Definition: EraseAll.h:138
Erasing all occurrences of a type from a type list.
Definition: EraseAll.h:74
Implementation of a type list.
Definition: TypeList.h:120
Header file for the TypeList class template.