Re: [Boost-bugs] [Boost C++ Libraries] #11461: signals2/signal.hpp does not compile with exceptions off

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11461: signals2/signal.hpp does not compile with exceptions off
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-15 18:55:19


#11461: signals2/signal.hpp does not compile with exceptions off
-------------------------------+----------------------
  Reporter: peterpastor@… | Owner: fmhess
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: signals2
   Version: Boost 1.58.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------

Comment (by gromer@…):

 Oh, I see what you're saying: Signals2 relies on this exception for non-
 exceptional control flow. That being the case, yes, Signals2 shouldn't
 compile with exceptions disabled, but that means we have the opposite
 problem: it doesn't fail to compile reliably enough. It looks like Clang
 will compile this code just fine with exceptions disabled, and although it
 doesn't compile in gcc, I would argue that's a bug. The line of code at
 issue is a re-throw inside a `catch` block, so it's harmless when
 exceptions are disabled, because it will never be reached.

 In any event, this is the wrong place for the error to occur: the code
 that makes Signals2 unsafe with exceptions disabled is the code that
 "swallows" exceptions: the `catch` blocks that don't re-throw in
 `last_value.hpp` and `optional_last_value.hpp`. Those whole functions (or
 the whole files, like `boost/thread/future.hpp`) should be wrapped in
 `#ifndef BOOST_NO_EXCEPTIONS`.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11461#comment:5>
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:18 UTC