Skip to content

Commit

Permalink
simplified modm::detail::most_digits
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSaw committed Oct 17, 2022
1 parent 64a71f6 commit f3b91c9
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/modm/math/utils/integer_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,9 @@ using least_uint = typename modm::uint_t<Bits>::least;
/// @cond
namespace detail
{
template<typename T>
constexpr int most_digits() {
return std::numeric_limits<T>::digits;
}

template<typename T, typename... Ts>
constexpr std::enable_if_t<sizeof...(Ts), int>
most_digits() {
return std::max(std::numeric_limits<T>::digits, most_digits<Ts...>());
template<typename... Ts>
consteval int most_digits() {
return std::max({std::numeric_limits<Ts>::digits...});
}
}
/// @endcond
Expand Down

0 comments on commit f3b91c9

Please sign in to comment.