Append.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_TYPELIST_APPEND_H_
36 #define _BLAZE_UTIL_TYPELIST_APPEND_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
67 template< typename TL // Type of the type list
68  , typename T > // The type to be appended to the type list
69 struct Append;
70 //*************************************************************************************************
71 
72 
73 //*************************************************************************************************
78 template< typename... Ts // Types of the type list
79  , typename T > // The type to be appended to the type list
80 struct Append< TypeList<Ts...>, T >
81 {
82  using Type = TypeList<Ts...,T>;
83 };
85 //*************************************************************************************************
86 
87 
88 //*************************************************************************************************
93 template< typename... Ts1 // Type of the type list
94  , typename... Ts2 > // The types to be appended to the type list
95 struct Append< TypeList<Ts1...>, TypeList<Ts2...> >
96 {
97  using Type = TypeList<Ts1...,Ts2...>;
98 };
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
116 template< typename TL // Type of the type list
117  , typename T > // The type to be appended to the type list
118 using Append_t = typename Append<TL,T>::Type;
119 //*************************************************************************************************
120 
121 } // namespace blaze
122 
123 #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
typename Append< TL, T >::Type Append_t
Auxiliary alias declaration for the Append class template.The Append_t alias declaration provides a c...
Definition: Append.h:118
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
Header file for the TypeList class template.