KUMI
v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
◆
make_tuple()
template<typename... Ts>
auto kumi::make_tuple
(
Ts &&...
ts
)
->
tuple
< std::unwrap_ref_decay_t< Ts >... >
inline
nodiscard
constexpr
Creates a tuple object, deducing the target type from the types of arguments.
Parameters
ts
Zero or more lvalue arguments to construct the tuple from.
Returns
A
kumi::tuple
constructed from the ts or their inner references when ts 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::make_tuple
constexpr auto make_tuple(Ts &&... ts) -> tuple< std::unwrap_ref_decay_t< Ts >... >
Creates a tuple object, deducing the target type from the types of arguments.
Definition
tuple.hpp:549
kumi::record::get
decltype(auto) constexpr get(record< Ts... > &r) noexcept
Extracts the Ith field from a kumi::record.
Definition
record.hpp:604
kumi