Boost C++ Libraries: Ticket #2947: serialization/throw_exception.hpp uses BOOST_NO_EXCEPTIONS in the wrong way https://svn.boost.org/trac10/ticket/2947 <p> 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. </p> <p> 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. </p> <p> First version that breaks is 1.37, in 1.36 the problem doesn't appear. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2947 Trac 1.4.3 Vladimir Prus Tue, 14 Apr 2009 15:53:25 GMT <link>https://svn.boost.org/trac10/ticket/2947#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2947#comment:1</guid> <description> <p> The actual problem is that: </p> <ol><li>in BOOST_NO_EXCEPTIONS the boost::serialization::throw_exception functions lacks 'inline' </li><li>in BOOST_NO_EXCEPTIONS case &lt;exception&gt; is included -- and it should not. </li></ol> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Sat, 16 May 2009 15:38:41 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/2947#comment:2 https://svn.boost.org/trac10/ticket/2947#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket Vladimir Prus Sat, 16 May 2009 16:23:47 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2947#comment:3 https://svn.boost.org/trac10/ticket/2947#comment:3 <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> </ul> <p> I have merged the fix to release branch. It will be available in 1.40.0. It might be available in 1.39.1, if we do it. Andreas, this fixes the duplicate boost::serialization::throw_exception. You still will have to define boost::throw exception with appropriate behaviour. </p> Ticket