7 #if !defined(CNL_IMPL_NUM_TRAITS_UNWRAP_H)
8 #define CNL_IMPL_NUM_TRAITS_UNWRAP_H
10 #include "is_composite.h"
16 template<
typename Number>
19 template<
typename Number>
20 requires(!is_composite<Number>::value)
struct unwrap<Number> {
21 [[nodiscard]] constexpr
auto operator()(Number
const& n)
const
27 template<
typename Number>
28 requires is_composite_v<Number>
29 struct unwrap<Number> {
30 [[nodiscard]] constexpr
auto operator()(Number
const& n)
const
32 return unwrap<rep_of_t<Number>>{}(to_rep(n));
37 template<
typename Number>
38 [[nodiscard]] constexpr
auto unwrap(Number
const& n)
40 return _impl::unwrap<Number>{}(n);
44 #endif // CNL_IMPL_NUM_TRAITS_UNWRAP_H