template<product_type T0, sized_product_type< size_v< T0 > >... Ts>
requires ( follows_same_semantic<T0, Ts...> )
| constexpr auto kumi::zip |
( |
T0 && |
t0, |
|
|
Ts &&... |
ts |
|
) |
| |
|
inlineconstexpr |
Constructs a tuple where the ith element is the prduct 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
- Every inner product type should be of the same sizes, otherwise see
zip_min or zip_max
Helper type
namespace kumi::result
{
template<product_type T>
struct zip;
template<product_type T>
using zip_t = typename zip<T>::type;
}
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:89
Computes the return type of a call to kumi::zip
Example
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
std::cout << r << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37