[Boost-bugs] [Boost C++ Libraries] #2947: serialization/throw_exception.hpp uses BOOST_NO_EXCEPTIONS in the wrong way

Subject: [Boost-bugs] [Boost C++ Libraries] #2947: serialization/throw_exception.hpp uses BOOST_NO_EXCEPTIONS in the wrong way
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-04-14 15:01:50


#2947: serialization/throw_exception.hpp uses BOOST_NO_EXCEPTIONS in the wrong way
--------------------------+-------------------------------------------------
 Reporter: apaku_at_[hidden] | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: None
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 Using boost multi_index in a project that doesn't supply -fexceptions (or
 rather that supplies -fno-exceptions) to the compiler fails at linking
 time because there's an undefined reference to
 boost::throw_exception(std::exception). This appears to be caused by the
 #ifdef stuff in serialization/throw_exception.hpp, which uses
 std::exception if BOOST_NO_EXCEPTIONS is defined. However this define is
 set when exception support is turned off.

 Hence instead of "#ifdef BOOST_NO_EXCEPTIONS" this should probably be
 "#ifndef BOOST_NO_EXCEPTIONS". Changing the header file accordingly makes
 the project I have here link properly.

 First version that breaks is 1.37, in 1.36 the problem doesn't appear.

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