Extracts a sub-tuple from a product type.
namespace kumi::result
{
template<
product_type Tuple, std::size_t I0, std::size_t I1=-1>
using extract_t = typename extract<Tuple,I0,I1>::type;
}
Concept specifying a type follows the Product Type semantic.
Definition concepts.hpp:33
constexpr auto extract(Tuple &&t, index_t< I0 > i0, index_t< I1 > i1) noexcept
Extracts a sub-tuple from a product type.
Definition extract.hpp:45
Computes the type returned by a call to extract.
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
auto last =
extract(a,kumi::index<3>);
std::cout << a << " => " << head << ' ' << mid << ' ' << last << '\n';
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37