1#ifndef __DUNE_ACFEM_MPL_UNIQUETAGS_HH__
2#define __DUNE_ACFEM_MPL_UNIQUETAGS_HH__
8 template<
class... Tags>
13 using TagTuple = TagContainer;
16 template<
class Input,
class Output>
17 struct RemoveImpliedType;
19 template<
class... In0,
class... In,
class... Out>
20 struct RemoveImpliedType<TypeTuple<TagContainer<In0...>, In...>, TypeTuple<Out...> >
21 : RemoveImpliedType<TypeTuple<In0..., In...>, TypeTuple<Out...> >
24 template<
class In0,
class... In,
class... Out>
25 struct RemoveImpliedType<TypeTuple<In0, In...>, TypeTuple<Out...> >
26 : RemoveImpliedType<TypeTuple<In...>, ConditionalType<(std::is_same<In0, void>::value
27 || (... || (std::is_base_of<In0, Out>::value))
28 || (... || (std::is_base_of<In0, In>::value))
31 TypeTuple<Out..., In0> > >
34 template<
class... Out>
35 struct RemoveImpliedType<TypeTuple<>, TypeTuple<Out...> >
37 using Type = TypeTuple<Out...>;
41 template<
class... Tags>
42 using RemoveImplied =
typename RemoveImpliedType<TypeTuple<Tags...>, TypeTuple<> >::Type;
45 struct MakeTagContainer;
47 template<
class... Tags>
48 struct MakeTagContainer<TypeTuple<Tags...> >
50 using Type = TagContainer<Tags...>;
53 template<
class... Tags>
54 using UniqueTags =
typename MakeTagContainer<
RemoveImplied<Tags...> >::Type;
Form a sub-sequence with the values at the positions NOT given in Indices.
Definition: conditional.hh:8
typename RemoveImpliedType< TypeTuple< Tags... >, TypeTuple<> >::Type RemoveImplied
Remove types which are base classes of other types in the list.
Definition: uniquetags.hh:42