try to resize the vector, returning if the vector was resized.
| 3529 | |
| 3530 | // try to resize the vector, returning if the vector was resized. |
| 3531 | FASTFLOAT_CONSTEXPR20 bool try_resize(size_t new_len, limb value) noexcept { |
| 3532 | if (new_len > capacity()) { |
| 3533 | return false; |
| 3534 | } else { |
| 3535 | resize_unchecked(new_len, value); |
| 3536 | return true; |
| 3537 | } |
| 3538 | } |
| 3539 | |
| 3540 | // check if any limbs are non-zero after the given index. |
| 3541 | // this needs to be done in reverse order, since the index |