kumi
v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
◆
make_tuple()
template<typename... Ts>
KUMI_TRIVIAL_NODISCARD constexpr
tuple
< typename std::unwrap_ref_decay< Ts >::type... > make_tuple
(
Ts &&...
ts
)
related
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/tuple.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
tuple