Skip to content

Commit f3b91c9

Browse files
committed
simplified modm::detail::most_digits
1 parent 64a71f6 commit f3b91c9

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/modm/math/utils/integer_traits.hpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,9 @@ using least_uint = typename modm::uint_t<Bits>::least;
3939
/// @cond
4040
namespace detail
4141
{
42-
template<typename T>
43-
constexpr int most_digits() {
44-
return std::numeric_limits<T>::digits;
45-
}
46-
47-
template<typename T, typename... Ts>
48-
constexpr std::enable_if_t<sizeof...(Ts), int>
49-
most_digits() {
50-
return std::max(std::numeric_limits<T>::digits, most_digits<Ts...>());
42+
template<typename... Ts>
43+
consteval int most_digits() {
44+
return std::max({std::numeric_limits<Ts>::digits...});
5145
}
5246
}
5347
/// @endcond

0 commit comments

Comments
 (0)