kumi
v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
◆
make_tuple()
template<typename... Ts>
constexpr auto kumi::make_tuple
(
Ts &&...
ts
)
->
tuple
<std::unwrap_ref_decay_t<Ts>...>
inline
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:486
kumi