7 #if !defined(CNL_IMPL_DUPLEX_INTEGER_NUMERIC_LIMITS_H)
8 #define CNL_IMPL_DUPLEX_INTEGER_NUMERIC_LIMITS_H
10 #include "../num_traits/from_rep.h"
12 #include "declaration.h"
18 template<
typename Upper,
typename Lower>
19 struct numeric_limits<
cnl::_impl::duplex_integer<Upper, Lower>> : numeric_limits<Upper> {
21 using lower_numeric_limits = numeric_limits<Lower>;
22 static_assert(lower_numeric_limits::is_integer);
24 using upper_numeric_limits = numeric_limits<Upper>;
25 static_assert(upper_numeric_limits::is_integer);
27 using value_type = cnl::_impl::duplex_integer<Upper, Lower>;
31 static constexpr
int digits = lower_numeric_limits::digits + upper_numeric_limits::digits;
33 [[nodiscard]]
static constexpr
auto lowest() noexcept
38 [[nodiscard]]
static constexpr
auto min() noexcept
43 [[nodiscard]]
static constexpr
auto max() noexcept
50 #endif // CNL_IMPL_DUPLEX_INTEGER_NUMERIC_LIMITS_H