Callable object constructing a product type by adding a value v at the end 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_back_t push_back
Callable object constructing a product type by adding a value v at the end of t.
Definition push_pop.hpp:229
- t: Base product type
- v: Value to insert at the end of t
- A product type composed of all elements of t in order followed by v.
template<kumi::concepts::product_type T, typename V>
using push_back_t =
decltype(
kumi::push_back(std::declval<T>(), std::declval<V>()));
template<kumi::concepts::product_type T, typename V> struct push_back
{
using type = kumi::result::push_back_t<T, V>;
};
Computes the return type of a call to kumi::push_back
- 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