template<concepts::product_type T0, concepts::product_type... Ts>
requires (concepts::follows_same_semantic<T0, Ts...>)
| auto kumi::zip_min |
( |
T0 && | t0, |
|
|
Ts &&... | ts ) |
|
inlinenodiscardconstexpr |
Constructs a tuple where the ith element is the prudct type of all ith elements of ts...
- Parameters
-
| t0 | Product type to convert |
| ts | Product types to convert |
- Returns
- The tuple of all combination of elements from t0, ts...
@ note zip_min truncates product types based on the smallest size.
Helper type
namespace kumi::result
{
template<product_type T>
struct zip_min;
template<product_type T>
}
constexpr auto zip(T0 &&t0, Ts &&... ts)
Constructs a tuple where the ith element is the prduct type of all ith elements of ts....
Definition zip.hpp:86
constexpr auto zip_min(T0 &&t0, Ts &&... ts)
Constructs a tuple where the ith element is the prudct type of all ith elements of ts....
Definition zip.hpp:120
Computes the return type of a call to kumi::zip_min
Examples:
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
std::cout << r << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:29
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
auto nbrs =
kumi::record{
"a"_id = 1,
"b"_id = 2,
"c"_id = 3,
"d"_id = 4,
"e"_id = 5,
"f"_id = 6};
auto ltrs =
kumi::record{
"aa"_id =
'a',
"bb"_id =
'b',
"cc"_id =
'c'};
auto ratio =
kumi::record{
"aaa"_id = 0.1,
"bbb"_id = 0.01,
"ccc"_id = 0.001,
"ddd"_id = 0.0001};
std::cout << r << "\n";
}
Fixed-size collection of heterogeneous fields necessarily named, names are unique.
Definition record.hpp:29