37template<
typename To,
typename From>
constexpr To
narrow(From from)
42 static_assert(std::is_arithmetic_v<From>);
43 static_assert(std::is_arithmetic_v<To>);
45 const To to = narrow_cast<To>(from);
48 if constexpr (std::is_signed_v<From> != std::is_signed_v<To>) {