There was an error while loading. Please reload this page.
1 parent 69a98f5 commit 6ac117dCopy full SHA for 6ac117d
include/slimcpplib/long_int.h
@@ -217,12 +217,7 @@ template<typename native_t, uint_t size>
217
template<uint_t other_size, std::enable_if_t<(other_size < size), int>>
218
constexpr long_int_t<native_t, size>::operator long_int_t<native_t, other_size>() const noexcept
219
{
220
- long_int_t<native_t, other_size> tmp;
221
-
222
- for (uint_t n = 0; n < other_size; ++n)
223
- tmp.digits[n] = digits[n];
224
225
- return tmp;
+ return make_array<other_size>(digits, [](const auto& digits, uint_t idx) { return digits[idx]; });
226
}
227
228
0 commit comments