boostorg / multiprecision

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

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

Open PaltryProgrammer opened 6 months ago

PaltryProgrammer commented 6 months ago

greetings & kind regards number::convert_to<T>() 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<int>(); 
auto _overflow = _int != _cpp_int;

thank you kindly