13 #ifndef TINYMPL_VARIADIC_UNIQUE_HPP
14 #define TINYMPL_VARIADIC_UNIQUE_HPP
16 #include <tinympl/variadic/remove.hpp>
35 template<
template<
class ...>
class Out,
class ... Args>
struct unique;
37 template<
template<
class ...>
class Out,
class Head,
class ... Tail>
38 struct unique<Out, Head, Tail...> {
40 template<
class ... Ts>
42 template<
class ... Us>
using next =
unique<Out, Us...>;
43 typedef typename remove<Head, next, Tail...>::type::
44 template impl<Ts..., Head>::type type;
47 template<
template<
class...>
class,
class...>
friend struct unique;
50 typedef typename impl<>::type type;
54 template<
template<
class ...>
class Out>
struct unique<Out> {
56 template<
class ... Ts>
58 typedef Out<Ts...> type;
61 template<
template<
class...>
class,
class...>
friend struct unique;
64 typedef typename impl<>::type type;
71 #endif // TINYMPL_VARIADIC_UNIQUE_HPP
Produces a sequence of unique elements from the input sequence, preserving the ordering.
Definition: unique.hpp:35
Produces a sequence of unique elements from the input sequence, preserving the ordering.
Definition: unique.hpp:38