Loading [MathJax]/extensions/tex2jax.js
kumi v3.1.0
Exquisite Epidote
 
All Classes Namespaces Functions Variables Friends Modules Pages Concepts
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
tsZero 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";
}
constexpr auto from_tuple(tuple< Ts... > const &t)
Converts a kumi::tuple to an instance of an arbitrary type.
Definition convert.hpp:59