kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches

◆ min() [1/2]

template<product_type T>
constexpr auto kumi::min ( T &&  t)
inlineconstexprnoexcept

Computes the minimum value all elements of t.

Parameters
tTuple to inspect
Returns
The minimum value of all elements of t

Helper type

namespace kumi
{
template<typename T> struct min;
template<typename T>
using min_t = typename min<T>::type;
}
constexpr auto min(T &&t) noexcept
Computes the minimum value all elements of t.
Definition minmax.hpp:165
Main KUMI namespace.
Definition algorithm.hpp:11

Computes the type returned by a call to kumi::min.

Example:

#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
auto f0 = kumi::tuple {1, 'A', -9.77f, 3. };
auto f1 = kumi::tuple {2., f0, 3.f };
std::cout << kumi::min(f0, [](auto m) { return sizeof(m); }) << "\n";
std::cout << kumi::min(f1, [](auto m) { return sizeof(m); }) << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37