Boost C++ Libraries: Ticket #5998: Make possible to don't provide hybrid error handling. https://svn.boost.org/trac10/ticket/5998 <p> Boost.Chrono provides by default an hybrid error handling for the Clock::now() function, implementing the following prototype </p> <p> Clock::now(system::error_code&amp;= boost::throws()); </p> <p> Now that the standard has accepted the prototype </p> <p> Clock::now() noexcept; </p> <p> the aforementioned prototype can not be noexcept, as the use of boost::throws() force the throw exception on error. </p> <p> We need to overload the function as follows: </p> <p> Clock::now() noexcept; Clock::now(system::error_code&amp;); </p> <p> This lost the advantages of the announced by the hybrid error handling design, as we are forced to have two implementations. </p> <p> 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. </p> <p> 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. </p> <p> The library could add a macro that prevent the inclusion of these prototype, as e.g. BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5998 Trac 1.4.3 viboes Sat, 08 Oct 2011 12:40:41 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/5998#comment:1 https://svn.boost.org/trac10/ticket/5998#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.48.0</span> </li> </ul> <p> Merged with <a class="missing ticket">#74801</a> </p> Ticket