#pragma once #include #undef min #undef max namespace nall { template constexpr auto min(const T& t, const U& u) -> T { return t < u ? t : (T)u; } template constexpr auto min(const T& t, const U& u, P&&... p) -> T { return t < u ? min(t, forward

(p)...) : min(u, forward

(p)...); } template constexpr auto max(const T& t, const U& u) -> T { return t > u ? t : (T)u; } template constexpr auto max(const T& t, const U& u, P&&... p) -> T { return t > u ? max(t, forward

(p)...) : max(u, forward

(p)...); } }