boostorg / boostorg/multiprecision

Qver/Under Flow Detection via number::convert_to<T>()

Open
#592 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
265
Forks
128
Avg merge
4h 48m
Merged PRs (30d)
2

Description

greetings & kind regards
`number::convert_to()` as near as i can discern does not report under/overflow . is there a means to detect same? other than exempli gratia :

```
cpp_int _cpp_int = 0x159357;
auto _int =_cpp_int.convert_to();
auto _overflow = _int != _cpp_int;
```
thank you kindly

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the number::convert_to() entry point and inspect the existing conversion behavior and tests for cpp_int. Determine whether overflow reporting is supported or needs a defined API, then add coverage showing the expected handling of values outside the target type's range.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.