boostorg / multiprecision

Boost.Multiprecision
Boost Software License 1.0
188 stars 112 forks source link

Ensure checked integers are in a sane state after a throw. #627

Closed jzmaddock closed 1 month ago

jzmaddock commented 1 month ago

Document that the value of the target operand is unspecified after a throw. Improve testing. Fixes https://github.com/boostorg/multiprecision/issues/626

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.1%. Comparing base (58b3962) to head (5926513).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/boostorg/multiprecision/pull/627/graphs/tree.svg?width=650&height=150&src=pr&token=SDDBym7Pc9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg)](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## develop #627 +/- ## ========================================= + Coverage 94.1% 94.1% +0.1% ========================================= Files 275 276 +1 Lines 26794 26846 +52 ========================================= + Hits 25188 25240 +52 Misses 1606 1606 ``` | [Files](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [include/boost/multiprecision/cpp\_int.hpp](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?src=pr&el=tree&filepath=include%2Fboost%2Fmultiprecision%2Fcpp_int.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC9tdWx0aXByZWNpc2lvbi9jcHBfaW50LmhwcA==) | `95.5% <100.0%> (+0.1%)` | :arrow_up: | | [test/git\_issue\_624.cpp](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?src=pr&el=tree&filepath=test%2Fgit_issue_624.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC9naXRfaXNzdWVfNjI0LmNwcA==) | `100.0% <100.0%> (ø)` | | | [test/git\_issue\_626.cpp](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?src=pr&el=tree&filepath=test%2Fgit_issue_626.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC9naXRfaXNzdWVfNjI2LmNwcA==) | `100.0% <100.0%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [58b3962...5926513](https://app.codecov.io/gh/boostorg/multiprecision/pull/627?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg).