3#ifndef pRC_CORE_BASIC_FUNCTIONS_MAX_H
4#define pRC_CORE_BASIC_FUNCTIONS_MAX_H
13 static inline constexpr decltype(
auto)
max(X &&a)
15 return as(forward<X>(a));
18 template<
class XA,
class XB>
19 requires IsInvocable<Greater, XA, XB>
20 static inline constexpr decltype(
auto)
max(XA &&a, XB &&b)
22 return where(a > b, forward<XA>(a), forward<XB>(b));
25 template<
class XA,
class XB,
class... Xs>
26 requires IsInvocable<Greater, XA, XB> &&
28 ResultOf<Where, ResultOf<Greater, XA, XB>, XA, XB>, Xs> &&
30 static inline constexpr decltype(auto)
max(XA &&a, XB &&b, Xs &&...args)
32 return max(
max(forward<XA>(a), forward<XB>(b)), forward<Xs>(args)...);
Definition cholesky.hpp:10
static constexpr decltype(auto) where(TE const e, XA &&a, XB &&b)
Definition where.hpp:11
static constexpr RemoveConst< X > as(X &&a)
Definition basics.hpp:83
static constexpr decltype(auto) max(X &&a)
Definition max.hpp:13