MCPcopy Create free account
hub / github.com/Neargye/magic_enum / reflected_min

Function reflected_min

include/magic_enum/magic_enum.hpp:729–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727
728template <typename E, enum_subtype S, typename U = std::underlying_type_t<E>>
729constexpr int reflected_min() noexcept {
730 if constexpr (S == enum_subtype::flags) {
731 return 0;
732 } else {
733 constexpr auto lhs = range_min<E>::value;
734 constexpr auto rhs = (std::numeric_limits<U>::min)();
735
736 if constexpr (cmp_less(rhs, lhs)) {
737 return lhs;
738 } else {
739 return rhs;
740 }
741 }
742}
743
744template <typename E, enum_subtype S, typename U = std::underlying_type_t<E>>
745constexpr int reflected_max() noexcept {

Callers

nothing calls this directly

Calls 1

cmp_lessFunction · 0.85

Tested by

no test coverage detected