[Boost-bugs] [Boost C++ Libraries] #9088: I/O Exception state & status savers may cause std::terminate in C++11

Subject: [Boost-bugs] [Boost C++ Libraries] #9088: I/O Exception state & status savers may cause std::terminate in C++11
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-07 13:09:13


#9088: I/O Exception state & status savers may cause std::terminate in C++11
------------------------------+----------------------
 Reporter: dlwalker | Owner: dlwalker
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: io
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 The `boost::io::basic_ios_iostate_saver` and
 `boost::io::basic_ios_exception_saver` class templates in file
 "boost/io/ios_state.hpp" alter the I/O exception state and trigger-mask,
 respectively, in their constructors and destructors. When a change in
 either makes the two statuses have a non-zero result when combined with
 bitwise-and, an exception is thrown.

 A potentially throwing destructor is problematic enough, but C++11 adds a
 new source of trouble. C++11 declares all destructors with no exception
 specification to be `noexcept` by default, which makes all imported
 pre-C++11 types with a throwing destructor to call `std::terminate` if
 they throw. The (immediate) fix would be to add a `noexcept(false)`
 specification to those destructors when used in C++11 mode.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9088>
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:14 UTC