ews-cpp icon indicating copy to clipboard operation
ews-cpp copied to clipboard

numeric_cast will never throw

Open obatysh opened this issue 4 years ago • 1 comments

Check in numeric_cast will never throw, as after the cast to the TargetType the value will never be greater than the maximum of the TargetType: if (static_cast<TargetType>(value) > std::numeric_limits<TargetType>::max()) { throw std::overflow_error("Cannot convert "); }

obatysh avatar Mar 03 '22 16:03 obatysh

@obatysh You are right! We will fix this. Thanks!

idolum avatar Mar 04 '22 09:03 idolum