Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
util
typelist
Unique.h
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_UTIL_TYPELIST_UNIQUE_H_
36
#define _BLAZE_UTIL_TYPELIST_UNIQUE_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/util/typelist/Append.h
>
44
#include <
blaze/util/typelist/Erase.h
>
45
#include <
blaze/util/typelist/TypeList.h
>
46
47
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
72
template
<
typename
TL >
// Type of the type list
73
struct
Unique
;
74
//*************************************************************************************************
75
76
77
//*************************************************************************************************
82
template
<>
83
struct
Unique
<
TypeList
<> >
84
{
85
using
Type
=
TypeList<>
;
86
};
88
//*************************************************************************************************
89
90
91
//*************************************************************************************************
96
template
<
typename
T
// Type of the head of the type list
97
,
typename
... Ts >
// Types of the tail of the type list
98
struct
Unique
<
TypeList
<T,Ts...> >
99
{
100
private
:
101
using
TL1 =
typename
Unique
<
TypeList
<Ts...> >
::Type
;
102
using
TL2 =
typename
Erase<TL1,T>::Type
;
103
104
public
:
105
using
Type
=
typename
Append< TypeList<T>
, TL2 >
::Type
;
106
};
108
//*************************************************************************************************
109
110
111
//*************************************************************************************************
124
template
<
typename
TL >
// Type of the type list
125
using
Unique_t
=
typename
Unique<TL>::Type
;
126
//*************************************************************************************************
127
128
}
// namespace blaze
129
130
#endif
Append.h
Header file for the Append class template.
Erase.h
Header file for the Erase class template.
blaze::Type
blaze::Unique_t
typename Unique< TL >::Type Unique_t
Auxiliary alias declaration for the Unique class template.
Definition
Unique.h:125
blaze::Append
Appending a type to a type list.
Definition
Append.h:69
blaze::Erase
Erasing the first occurrence of a type from a type list.
Definition
Erase.h:74
blaze::TypeList
Implementation of a type list.
Definition
TypeList.h:120
blaze::Unique
Erasing all duplicates from a type list.
Definition
Unique.h:73
TypeList.h
Header file for the TypeList class template.
Generated by
1.18.0