Callable object constructing a product type by adding a value v at the beginning of t.
On record types, this function operates on elements as if they were ordered. The considered order is the order of declaration.
#include <kumi/algorithm/push_pop.hpp>
template<product_type T, typename V>
constexpr push_front_t push_front
Callable object constructing a product type by adding a value v at the beginning of t.
Definition push_pop.hpp:118
- t: Base product type
- v: Value to insert in front of t
- A product type composed of v followed by all elements of t in order.
template<kumi::concepts::product_type T, typename V>
using push_front_t =
decltype(
kumi::push_front(std::declval<T>(), std::declval<V>()));
template<kumi::concepts::product_type T, typename V> struct push_front
{
using type = kumi::result::push_front_t<T, V>;
};
Computes the return type of a call to kumi::push_front
- Tuple
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
std::cout << t << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:35
- Record
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
std::cout << t << "\n";
}
Fixed-size collection of heterogeneous tagged fields, tags are unique.
Definition record.hpp:36