Callable object used to retrieve the back of a product type.
- Note
- This function does not take part in overload resolution if t is an empty product type.
#include <kumi/algorithm/back_front.hpp>
template<product_type T>
[[nodiscard]]
constexpr decltype(
auto)
back(T && t);
constexpr back_t back
Callable object used to retrieve the back of a product type.
Definition back_front.hpp:130
- t: Product Type to access
- A reference to the last element of the product type t.
template<kumi::concepts::product_type T>
struct back : kumi::stored_member<kumi::size_v<T> - 1, T>
{
};
template<kumi::concepts::product_type T> using back_t = typename kumi::result::back<T>::type;
Computes the return type of a call to kumi::back
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
std::cout << x << "\n";
}
constexpr front_t front
Callable object used to retrieve the front of a product type.
Definition back_front.hpp:80
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:33
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
std::cout << x << "\n";
}
Fixed-size collection of heterogeneous tagged fields, tags are unique.
Definition record.hpp:36