Re: [Boost-bugs] [Boost C++ Libraries] #6700: Exceptionless lexical_cast

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6700: Exceptionless lexical_cast
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-30 07:21:37

#6700: Exceptionless lexical_cast
  Reporter: Olaf van der Spek <olafvdspek@…> | Owner: apolukhin
      Type: Feature Requests | Status: reopened
 Milestone: To Be Determined | Component: lexical_cast
   Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:

Comment (by Troy Korjuslommi <troykor@…>):

 I added the patch here.

 try_lexical_cast: A version which doesn't throw bad_lexical_cast. All
 other exceptions will be thrown as normal.

 Getting rid of exceptions thrown in the callbacks nothrow_overflow_handler
 and detect_precision_loss would mean rewriting boost::numeric::converter,
 which seems excessive, and futile. And it would create a dependency on
 those patches going through for this patch to be accepted. Ergo, I
 resorted to catching these exceptions to provide non throwing behavior.

 All other instances where an instance of bad_lexical_cast could be thrown
 have been replaced with a new function.

 Dropped the deprecated call-by-value fallback version
 template<typename Target, typename Source>
 bool bool try_lexical_cast(Target& result, Source arg);

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC