Boost logo

Boost Users :

Subject: Re: [Boost-users] try_numeric_convert (akin to try_lexical_convert)
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2015-03-23 11:32:19


2015-03-05 4:26 GMT+04:00 Chris Franz <cfranz_at_[hidden]>:

> We're using the new try_lexical_convert function in our code so we can
> encapsulate errors in the standard manner used in our project. A
> counterpart
> for numeric_cast would be useful. Is any such thing in the works?
>

There's no such work in progress.

However you can take a look here
https://github.com/boostorg/lexical_cast/blob/master/include/boost/lexical_cast/detail/converter_numeric.hpp#L85

See the `noexcept_numeric_convert` method. It's really close to what you're
requesting.

-- 
Best regards,
Antony Polukhin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net