KUMI v4.0.0
Flawless Fluorite
Loading...
Searching...
No Matches
kumi::function::element_or< I, T, U > Struct Template Reference

If T is a kumi::product_type and I is within it's size, returns element_t<I,T>, returns U otherwise. More...

#include <kumi/functional/monadic.hpp>

Detailed Description

template<std::size_t I, typename T, typename U>
struct kumi::function::element_or< I, T, U >

If T is a kumi::product_type and I is within it's size, returns element_t<I,T>, returns U otherwise.

Template Parameters
IIndex of the type to retrieve
Ttype to access
Ufallback type

Helper type

namespace kumi
{
template<std::size_t I, typename T, typename U> using element_or_t = typename element_or<I,T,U>::type;
}
Main KUMI namespace.
Definition algorithm.hpp:11