KUMI v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches

Creates a tuple object, deducing the target type from the types of arguments. More...

Variables

constexpr make_tuple_t kumi::make_tuple {}

Detailed Description

Creates a tuple object, deducing the target type from the types of arguments.

Variable Documentation

◆ make_tuple

make_tuple_t kumi::make_tuple {}
inlineconstexprnodiscard

Header file

#include <kumi/kumi.hpp>

Call Signature

namespace kumi
{
template<typename... Ts>
constexpr auto make_tuple(Ts&&... ts);
}
constexpr make_tuple_t make_tuple
Definition tuple.hpp:655
Main KUMI namespace.
Definition algorithm.hpp:11

Parameters

  • ts: Zero or more arguments to construct the tuple from.

Return value

  • A kumi::tuple constructed from the arguments or their inner references when an argument 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";
}
decltype(auto) constexpr get(array< T, N > &t) noexcept
Extracts the Ith element from a kumi::array.
Definition array.hpp:672