Loading [MathJax]/extensions/tex2jax.js
kumi
v3.1.0
Exquisite Epidote
•
All
Classes
Namespaces
Functions
Variables
Friends
Modules
Pages
Concepts
Loading...
Searching...
No Matches
◆
max()
[1/2]
template<
typename
T
>
constexpr
auto
kumi::max
(
T
const
&
t
)
constexpr
noexcept
Computes the maximum value all elements of t.
Parameters
t
Tuple to inspect
Returns
The maximum value of all elements of t
Helper type
namespace
kumi
{
template
<
typename
T>
struct
max
;
template
<
typename
T>
using
max_t =
typename
max<T>::type;
}
kumi::max
constexpr auto max(T const &t) noexcept
Computes the maximum value all elements of t.
Definition
minmax.hpp:35
kumi
Main KUMI namespace.
Definition
algorithm.hpp:11
Computes the type returned by a call to
kumi::max
.
Example:
#include <kumi/tuple.hpp>
#include <iostream>
int
main
()
{
auto
f0
=
kumi::tuple
{1,
'A'
, 99.77f, 3. };
auto
f1
=
kumi::tuple
{2.,
f0
, 3.f };
std::cout <<
kumi::max
(
f0
) <<
"\n"
;
std::cout <<
kumi::max
(
f1
, [](
auto
m
) {
return
sizeof
(
m
); }) <<
"\n"
;
}
kumi::from_tuple
constexpr auto from_tuple(tuple< Ts... > const &t)
Converts a kumi::tuple to an instance of an arbitrary type.
Definition
convert.hpp:59
kumi::tuple
Fixed-size collection of heterogeneous values.
Definition
tuple.hpp:35
kumi