kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches

◆ tie()

template<typename... Ts>
KUMI_TRIVIAL_NODISCARD constexpr tuple< Ts &... > tie ( Ts &...  ts)
related

Creates a kumi::tuple of lvalue references to its arguments.

Parameters
tsZero or more lvalue arguments to construct the tuple from.
Returns
A kumi::tuple object containing lvalue references.

Example:

#include <kumi/tuple.hpp>
#include <iostream>
auto generate()
{
return kumi::tuple{1,2.3,4.56f};
}
int main()
{
int i;
double d;
float f;
kumi::tie( i,d,f ) = generate();
std::cout << i << " " << d << " " << f << "\n";
}
constexpr auto generate(T const &v) noexcept
Creates a kumi::tuple containing N copies of v.
Definition: generate.hpp:42
Fixed-size collection of heterogeneous values.
Definition: tuple.hpp:35