KUMI v4.0.0
Flawless Fluorite
Loading...
Searching...
No Matches

◆ element_or_t

template<std::size_t I, typename T, typename U>
using kumi::function::element_or_t = std::remove_cvref_t<decltype(kumi::function::get_or<I>(std::declval<T>(), std::declval<U>()))>

#include <kumi/functional/monadic.hpp>

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;
}
std::remove_cvref_t< decltype(kumi::function::get_or< I >(std::declval< T >(), std::declval< U >()))> element_or_t
If T is a kumi::product_type and I is within it's size, returns element_t<I,T>, returns U otherwise.
Definition monadic.hpp:74
Main KUMI namespace.
Definition algorithm.hpp:11