3#ifndef pRC_CORE_BASIC_FUNCTIONS_MIN_H
4#define pRC_CORE_BASIC_FUNCTIONS_MIN_H
13 static inline constexpr decltype(
auto)
min(X &&a)
15 return as(forward<X>(a));
18 template<
class XA,
class XB>
19 requires IsInvocable<Less, XA, XB>
20 static inline constexpr decltype(
auto)
min(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<Less, XA, XB> &&
27 (IsInvocable<Less, ResultOf<Where, ResultOf<Less, XA, XB>, XA, XB>,
30 static inline constexpr decltype(auto)
min(XA &&a, XB &&b, Xs &&...args)
32 return min(
min(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 decltype(auto) min(X &&a)
Definition min.hpp:13
static constexpr RemoveConst< X > as(X &&a)
Definition basics.hpp:83