kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches

◆ unique()

template<product_type T>
constexpr auto kumi::unique ( T &&  t)
inlineconstexpr

Returns a product type with consecutive duplicate types removed (pairwise uniqueness).

Parameters
tProduct type to process
Returns
A product type containing elements from t with consecutive duplicates removed.

Helper type

namespace kumi
{
template<product_type T> struct unique;
template<product_type T>
using unique_t = typename unique<T>::type;
}
constexpr auto unique(T &&t)
Returns a product type with consecutive duplicate types removed (pairwise uniqueness).
Definition unique.hpp:86
Main KUMI namespace.
Definition algorithm.hpp:11

Computes the type returned by a call to kumi::unique.

Example:

#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
tuple a = {1, 2, 'x', 3, 1.f, 2.f};
std::cout << kumi::unique(a) << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37