Callable object computing the minimum value of applications of f to all elements of kumi::flatten_all(t).
More...
Callable object computing the minimum value of applications of f to all elements of kumi::flatten_all(t).
◆ min_flat
| min_flat_t kumi::min_flat {} |
|
inlineconstexprnodiscardnoexcept |
{
template<concepts::product_type T, typename Function>
constexpr auto min_flat(T && t, Function f)
noexcept;
}
constexpr min_flat_t min_flat
Definition minmax.hpp:368
Main KUMI namespace.
Definition algorithm.hpp:11
- t: Product Type to inspect
- f: Unary callable object to be invoked
- The minimum value of f over all elements of a flattened version of t
template<typename T, typename F>
template<typename T, typename F> struct min_flat
{
using type = kumi::result::min_flat_t<T, F>;
};
Computes the return type of a call to kumi::min_flat
- Tuple
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
std::cout <<
kumi::min_flat (f0 , [](
auto m) {
return sizeof(m); }) <<
"\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:35
- Record
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
kumi::record {
"c"_id =1.,
"d"_id =
'u',
"e"_id =3. },
"f"_id =3.f };
std::cout <<
kumi::min_flat (f0 , [](
auto m) {
return sizeof(m); }) <<
"\n";
}
Fixed-size collection of heterogeneous fields with distinct labels.
Definition record.hpp:36