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

◆ pop_front()

template<product_type Tuple>
constexpr auto kumi::pop_front ( Tuple const &  t)
constexpr

Remove the first (if any) element of a kumi::product_type.

Parameters
tBase tuple
Returns
A tuple composed of all elements of t except its first. Has no effect on empty t.

Helper type

namespace kumi::result
{
template<product_type Tuple> struct pop_front;
template<product_type Tuple>
using pop_front_t = typename pop_front<Tuple>::type;
}
constexpr auto pop_front(Tuple const &t)
Remove the first (if any) element of a kumi::product_type.
Definition: push_pop.hpp:71

Computes the return type of a call to kumi::pop_front

Example

#include <kumi/tuple.hpp>
#include <iostream>
int main()
{
std::cout << kumi::pop_front( kumi::tuple{} ) << "\n";
kumi::tuple t{1,2.,3.4f};
std::cout << t << "\n";
std::cout << kumi::pop_front(t) << "\n";
}
Fixed-size collection of heterogeneous values.
Definition: tuple.hpp:35