try to resize the vector, returning if the vector was resized.
| 1946 | } |
| 1947 | // try to resize the vector, returning if the vector was resized. |
| 1948 | FASTFLOAT_CONSTEXPR20 bool try_resize(size_t new_len, limb value) noexcept { |
| 1949 | if (new_len > capacity()) { |
| 1950 | return false; |
| 1951 | } else { |
| 1952 | resize_unchecked(new_len, value); |
| 1953 | return true; |
| 1954 | } |
| 1955 | } |
| 1956 | // check if any limbs are non-zero after the given index. |
| 1957 | // this needs to be done in reverse order, since the index |
| 1958 | // is relative to the most significant limbs. |