KUMI
v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches
◆
make_tuple
make_tuple_t kumi::make_tuple {}
inline
constexpr
nodiscard
Creates a tuple object, deducing the target type from the types of arguments.
Header file
#include <kumi/product_types/tuple.hpp>
Call Signature
template
<
typename
... Ts>
constexpr
auto
make_tuple
(Ts&&... ts);
kumi::make_tuple
constexpr make_tuple_t make_tuple
Creates a tuple object, deducing the target type from the types of arguments.
Definition
tuple.hpp:637
Parameters
ts
: Zero or more arguments to construct the tuple from.
Return value
A
kumi::tuple
constructed from the arguments or their inner references when an argument is an instance of
std::reference_wrapper
.
Example
#include <kumi/kumi.hpp>
#include <functional>
#include <iostream>
int
main()
{
int
k = 99;
auto
t =
kumi::make_tuple
( 1, 2.3, 4.5f,
'@'
, std::ref(k));
std::cout << t <<
"\n"
;
// Reference access
get<4>
(t)++;
std::cout << k <<
"\n"
;
}
kumi::record::get
decltype(auto) constexpr get(record< Ts... > &r) noexcept
Extracts the Ith field from a kumi::record.
Definition
record.hpp:766
kumi