KUMI v4.0.0
Flawless Fluorite
Loading...
Searching...
No Matches
kumi::common_product_type< Ts > Struct Template Reference

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

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 properly compute the Least Restrictive Subtype of a pack this trait is specialized in the following way.

Note
It is used in algorithm taking multiple product types as input in order to determine the correct output type.
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 traits.hpp:508