Loading [MathJax]/extensions/tex2jax.js
kumi v3.1.0
Exquisite Epidote
 
All Classes Namespaces Functions Variables Friends Modules Pages Concepts
Loading...
Searching...
No Matches

◆ cat()

template<product_type... Tuples>
KUMI_TRIVIAL_NODISCARD constexpr auto kumi::cat ( Tuples &&...  ts)
constexpr

Concatenates tuples in a single one.

Parameters
tsTuples to concatenate
Returns
A tuple made of all element of all input tuples in order

Helper type

namespace kumi::result
{
template<product_type... Tuples> struct cat;
template<product_type... Tuples>
using cat_t = typename cat<Tuples...>::type;
}
Concept specifying a type follows the Product Type semantic.
Definition concepts.hpp:33
KUMI_TRIVIAL_NODISCARD constexpr auto cat(Tuples &&... ts)
Concatenates tuples in a single one.
Definition cat.hpp:36
constexpr auto from_tuple(tuple< Ts... > const &t)
Converts a kumi::tuple to an instance of an arbitrary type.
Definition convert.hpp:59

Computes the return type of a call to kumi::cat

Example

#include <kumi/tuple.hpp>
#include <iostream>
int main()
{
kumi::tuple a = { 1, 2.3, 4.5f};
kumi::tuple b = { '6' };
kumi::tuple c = { "7", short{89} };
auto abc = cat(a,b,c);
std::cout << a << " " << b << " " << c << "\n";
std::cout << abc << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:35