Callable object returning the Cartesian Product of all elements of its arguments product types.
- Note
- This function does not take part in overload resolution if the input product types do not follow the same semantic.
- See also
- concepts::follows_same_semantic
#include <kumi/algorithm/cartesian_product.hpp>
template<product_type... Ts>
constexpr cartesian_product_t cartesian_product
Callable object returning the Cartesian Product of all elements of its arguments product types.
Definition cartesian_product.hpp:89
- ts: Product Types to process
- A tuple containing all the product types built from all combination of all ts' elements
{
};
template<typename... Ts> using cartesian_product_t = typename kumi::result::cartesian_product<Ts...>::type;
Computes the return type of a call to kumi::cartesian_product
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
kumi::for_each_index( [](auto i, auto e)
{
std::cout << "# " << i
<< ":" << std::boolalpha
<< e << "\n";
}
, r
);
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:33
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
auto id =
kumi::record{
"aa"_id =
'a',
"bb"_id =
'b',
"cc"_id =
'c'};
auto value =
kumi::record{
"aaa"_id = 1.0,
"bbb"_id = 2.1,
"ccc"_id = 4.2,
"d"_id = 8.4};
kumi::for_each_index( [](auto i, auto e)
{
std::cout << "# " << i
<< ":" << std::boolalpha
<< e << "\n";
}
, r
);
}
Fixed-size collection of heterogeneous tagged fields, tags are unique.
Definition record.hpp:36