[Boost-bugs] [Boost C++ Libraries] #5998: Make possible to don't provide hybrid error handling.

Subject: [Boost-bugs] [Boost C++ Libraries] #5998: Make possible to don't provide hybrid error handling.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-08 11:48:20


#5998: Make possible to don't provide hybrid error handling.
------------------------------+---------------------------------------------
 Reporter: viboes | Owner: viboes
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: chrono
  Version: Boost 1.47.0 | Severity: Not Applicable
 Keywords: |
------------------------------+---------------------------------------------
 Boost.Chrono provides by default an hybrid error handling for the
 Clock::now() function, implementing the following prototype

 Clock::now(system::error_code&= boost::throws());

 Now that the standard has accepted the prototype

 Clock::now() noexcept;

 the aforementioned prototype can not be noexcept, as the use of
 boost::throws() force the throw exception on error.

 We need to overload the function as follows:

 Clock::now() noexcept;
 Clock::now(system::error_code&);

 This lost the advantages of the announced by the hybrid error handling
 design, as we are forced to have two implementations.

 In addition, while most of the uses of now(ec) expect that there is no
 exception, the prototype can not state it using noexcept, if the
 boost::throws() semantic is taken in account.

 Due to this split, we can now make Boost.Chrono a real header-only library
 if we admit to renounce to use the error_code interface.

 The library could add a macro that prevent the inclusion of these
 prototype, as e.g. BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5998>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

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