|
580 | 580 | WIDE_INTEGER_NODISCARD constexpr auto front() -> reference { return elems[static_cast<size_type>(UINT8_C(0))]; } |
581 | 581 | WIDE_INTEGER_NODISCARD constexpr auto front() const -> const_reference { return elems[static_cast<size_type>(UINT8_C(0))]; } |
582 | 582 |
|
583 | | - WIDE_INTEGER_NODISCARD constexpr auto back() -> reference { return elems[static_cast<size_type>(N - static_cast<size_type>(UINT8_C(1)))]; } |
584 | | - WIDE_INTEGER_NODISCARD constexpr auto back() const -> const_reference { return elems[static_cast<size_type>(N - static_cast<size_type>(UINT8_C(1)))]; } |
| 583 | + WIDE_INTEGER_NODISCARD constexpr auto back() -> reference { return elems[N - UINT8_C(1)]; } |
| 584 | + WIDE_INTEGER_NODISCARD constexpr auto back() const -> const_reference { return elems[N - UINT8_C(1)]; } |
585 | 585 |
|
586 | 586 | WIDE_INTEGER_NODISCARD static constexpr auto size() -> size_type { return N; } |
587 | 587 | WIDE_INTEGER_NODISCARD static constexpr auto empty() -> bool { return false; } |
|
2937 | 2937 |
|
2938 | 2938 | if(field_width != static_cast<unsigned_fast_type>(UINT8_C(0))) |
2939 | 2939 | { |
2940 | | - field_width = (detail::min_unsafe)(field_width, static_cast<unsigned_fast_type>(str_temp.size() - static_cast<size_t>(UINT8_C(1)))); // LCOV_EXCL_LINE |
| 2940 | + field_width = (detail::min_unsafe)(field_width, static_cast<unsigned_fast_type>(str_temp.size() - UINT8_C(1))); // LCOV_EXCL_LINE |
2941 | 2941 |
|
2942 | | - while(static_cast<signed_fast_type>(pos) > static_cast<signed_fast_type>((str_temp.size() - static_cast<size_t>(UINT8_C(1))) - field_width)) // NOLINT(altera-id-dependent-backward-branch) |
| 2942 | + while(static_cast<signed_fast_type>(pos) > static_cast<signed_fast_type>((str_temp.size() - UINT8_C(1)) - static_cast<size_t>(field_width))) // NOLINT(altera-id-dependent-backward-branch) |
2943 | 2943 | { |
2944 | 2944 | str_temp[static_cast<typename string_storage_oct_type::size_type>(--pos)] = fill_char_str; |
2945 | 2945 | } |
|
3023 | 3023 |
|
3024 | 3024 | if(field_width != static_cast<unsigned_fast_type>(UINT8_C(0))) |
3025 | 3025 | { |
3026 | | - field_width = (detail::min_unsafe)(field_width, static_cast<unsigned_fast_type>(str_temp.size() - static_cast<size_t>(UINT8_C(1)))); // LCOV_EXCL_LINE |
| 3026 | + field_width = (detail::min_unsafe)(field_width, static_cast<unsigned_fast_type>(str_temp.size() - size_t { UINT8_C(1) })); // LCOV_EXCL_LINE |
3027 | 3027 |
|
3028 | | - while(static_cast<signed_fast_type>(pos) > static_cast<signed_fast_type>((str_temp.size() - static_cast<size_t>(UINT8_C(1))) - field_width)) // NOLINT(altera-id-dependent-backward-branch) |
| 3028 | + while(static_cast<signed_fast_type>(pos) > static_cast<signed_fast_type>((str_temp.size() - size_t { UINT8_C(1) }) - static_cast<size_t>(field_width))) // NOLINT(altera-id-dependent-backward-branch) |
3029 | 3029 | { |
3030 | 3030 | str_temp[static_cast<typename string_storage_dec_type::size_type>(--pos)] = fill_char_str; |
3031 | 3031 | } |
3032 | 3032 | } |
3033 | 3033 |
|
3034 | | - str_temp[static_cast<typename string_storage_dec_type::size_type>(str_temp.size() - static_cast<size_t>(UINT8_C(1)))] = '\0'; |
| 3034 | + str_temp[static_cast<typename string_storage_dec_type::size_type>(str_temp.size() - size_t { UINT8_C(1) })] = '\0'; |
3035 | 3035 |
|
3036 | 3036 | detail::strcpy_unsafe(str_result, str_temp.data() + pos); |
3037 | 3037 | } |
|
3060 | 3060 | { |
3061 | 3061 | static_cast<signed_fast_type> |
3062 | 3062 | ( |
3063 | | - string_storage_hex_type::static_size() - static_cast<size_t>(UINT8_C(1)) // LCOV_EXCL_LINE |
| 3063 | + string_storage_hex_type::static_size() - size_t { UINT8_C(1) } // LCOV_EXCL_LINE |
3064 | 3064 | ) |
3065 | 3065 | }; |
3066 | 3066 |
|
|
3095 | 3095 |
|
3096 | 3096 | if(field_width != static_cast<unsigned_fast_type>(UINT8_C(0))) |
3097 | 3097 | { |
3098 | | - field_width = (detail::min_unsafe)(field_width, static_cast<unsigned_fast_type>(str_temp.size() - static_cast<size_t>(UINT8_C(1)))); // LCOV_EXCL_LINE |
| 3098 | + field_width = (detail::min_unsafe)(field_width, static_cast<unsigned_fast_type>(str_temp.size() - size_t { UINT8_C(1) })); // LCOV_EXCL_LINE |
3099 | 3099 |
|
3100 | | - while(static_cast<signed_fast_type>(pos) > static_cast<signed_fast_type>((str_temp.size() - static_cast<size_t>(UINT8_C(1))) - field_width)) // NOLINT(altera-id-dependent-backward-branch) |
| 3100 | + while(static_cast<signed_fast_type>(pos) > static_cast<signed_fast_type>((str_temp.size() - size_t { UINT8_C(1) }) - static_cast<size_t>(field_width))) // NOLINT(altera-id-dependent-backward-branch) |
3101 | 3101 | { |
3102 | 3102 | str_temp[static_cast<typename string_storage_hex_type::size_type>(--pos)] = fill_char_str; |
3103 | 3103 | } |
|
4826 | 4826 |
|
4827 | 4827 | using uu_array_type = |
4828 | 4828 | std::conditional_t<std::is_same<AllocatorType, void>::value, |
4829 | | - detail::fixed_static_array <limb_type, static_cast<size_t>(number_of_limbs + static_cast<size_t>(UINT8_C(1)))>, |
| 4829 | + detail::fixed_static_array <limb_type, number_of_limbs + size_t { UINT8_C(1) }>, |
4830 | 4830 | detail::fixed_dynamic_array<limb_type, |
4831 | | - static_cast<size_t>(number_of_limbs + static_cast<size_t>(UINT8_C(1))), |
| 4831 | + number_of_limbs + size_t { UINT8_C(1) }, |
4832 | 4832 | typename std::allocator_traits<std::conditional_t<std::is_same<AllocatorType, void>::value, |
4833 | 4833 | std::allocator<void>, |
4834 | 4834 | AllocatorType>>::template rebind_alloc<limb_type>>>; |
|
6195 | 6195 | const auto left_shift_amount = |
6196 | 6196 | static_cast<unsigned_fast_type> |
6197 | 6197 | ( |
6198 | | - (msb_pos_mod_3 == static_cast<unsigned_fast_type>(UINT8_C(0))) |
6199 | | - ? static_cast<unsigned_fast_type>(UINT8_C(1)) + static_cast<unsigned_fast_type>(static_cast<unsigned_fast_type>(msb_pos + static_cast<unsigned_fast_type>(UINT8_C(0))) / 3U) |
6200 | | - : static_cast<unsigned_fast_type>(UINT8_C(1)) + static_cast<unsigned_fast_type>(static_cast<unsigned_fast_type>(msb_pos + static_cast<unsigned_fast_type>(static_cast<unsigned_fast_type>(UINT8_C(3)) - msb_pos_mod_3)) / 3U) |
| 6198 | + (msb_pos_mod_3 == unsigned_fast_type { UINT8_C(0) }) |
| 6199 | + ? unsigned_fast_type { UINT8_C(1) } + static_cast<unsigned_fast_type>(msb_pos / unsigned_fast_type { UINT8_C(3) }) |
| 6200 | + : unsigned_fast_type { UINT8_C(1) } + static_cast<unsigned_fast_type>((msb_pos + (unsigned_fast_type { UINT8_C(3) } - msb_pos_mod_3)) / unsigned_fast_type { UINT8_C(3) }) |
6201 | 6201 | ); |
6202 | 6202 |
|
6203 | 6203 | auto u = static_cast<local_wide_integer_type>(static_cast<unsigned>(UINT8_C(1))) << left_shift_amount; |
|
6280 | 6280 | const auto left_shift_amount = |
6281 | 6281 | static_cast<unsigned_fast_type> |
6282 | 6282 | ( |
6283 | | - ((msb_pos_mod_k == static_cast<unsigned_fast_type>(UINT8_C(0))) |
6284 | | - ? static_cast<unsigned_fast_type>(UINT8_C(1)) + static_cast<unsigned_fast_type>(static_cast<unsigned_fast_type>(msb_pos + static_cast<unsigned_fast_type>(UINT8_C(0))) / k) |
6285 | | - : static_cast<unsigned_fast_type>(UINT8_C(1)) + static_cast<unsigned_fast_type>(static_cast<unsigned_fast_type>(msb_pos + static_cast<unsigned_fast_type>(k - msb_pos_mod_k)) / k)) |
| 6283 | + (msb_pos_mod_k == unsigned_fast_type { UINT8_C(0) }) |
| 6284 | + ? unsigned_fast_type { UINT8_C(1) } + static_cast<unsigned_fast_type>(msb_pos / unsigned_fast_type { k }) |
| 6285 | + : unsigned_fast_type { UINT8_C(1) } + static_cast<unsigned_fast_type>((msb_pos + (unsigned_fast_type { k } - msb_pos_mod_k)) / unsigned_fast_type { k }) |
6286 | 6286 | ); |
6287 | 6287 |
|
6288 | 6288 | auto u = static_cast<local_wide_integer_type>(static_cast<unsigned>(UINT8_C(1))) << left_shift_amount; |
|
6783 | 6783 | explicit constexpr uniform_int_distribution(const param_type& other_params) |
6784 | 6784 | : my_params(other_params) { } |
6785 | 6785 |
|
6786 | | - constexpr uniform_int_distribution(const uniform_int_distribution& other_distribution) = delete; |
| 6786 | + constexpr uniform_int_distribution(const uniform_int_distribution& other) : my_params(other.my_params) { } |
6787 | 6787 |
|
6788 | | - constexpr uniform_int_distribution(uniform_int_distribution&& other) noexcept : my_params(other.my_params) { } |
| 6788 | + constexpr uniform_int_distribution(uniform_int_distribution&& other) noexcept : my_params(static_cast<param_type&&>(other.my_params)) { } |
6789 | 6789 |
|
6790 | 6790 | ~uniform_int_distribution() = default; |
6791 | 6791 |
|
|
6801 | 6801 |
|
6802 | 6802 | auto constexpr operator=(uniform_int_distribution&& other) noexcept -> uniform_int_distribution& |
6803 | 6803 | { |
6804 | | - my_params = other.my_params; |
| 6804 | + my_params = static_cast<param_type&&>(other.my_params); |
6805 | 6805 |
|
6806 | 6806 | return *this; |
6807 | 6807 | } |
|
0 commit comments