KUMI v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
kumi::common_product_type< Ts > Struct Template Reference

Extracts the common product_type of a parameter pack. More...

#include <kumi/utils/builder.hpp>

Detailed Description

template<typename... Ts>
struct kumi::common_product_type< Ts >

Extracts the common product_type of a parameter pack.

If all the types are record types then it returns an empty record type, otherwise returns an empty product type. As we are unable to compute the Least Restrictive Subtype of a pack, this trait should be specialized for each case one would want to write. For the kumi library, it is specialized for kumi::tuple and kumi::record

Template Parameters
TsThe product types to access

Helper type

namespace kumi
{
template<typename... Ts> using common_product_type_t = typename common_product_type<Ts...>::type;
}
Main KUMI namespace.
Definition algorithm.hpp:11
Extracts the common product_type of a parameter pack.
Definition builder.hpp:34