From: Hochhaus, A. <aho...@sa...> - 2011-03-14 01:14:48
|
Hi Dean, Thanks! On Sun, Mar 13, 2011 at 7:17 PM, Dean Michael Berris <mik...@gm...> wrote: > I remember having to look for bare > calls to 'throw' and replacing them with BOOST_THROW -- with the > intention that BOOST_NO_EXCEPTIONS would require users to provide > their own exception handler function. Right. As you say, my understanding is that replacing the "bare throw" calls with boost::throw_exception() allows for a user supplied alternative definition in the event that BOOST_NO_EXCEPTIONS is supplied. http://www.boost.org/doc/libs/1_46_1/libs/exception/doc/throw_exception.html > I hoped that these would be > sufficient, although I'm not sure whether you're looking for anything > more specific with regards to BOOST_NO_EXCEPTIONS. The only other thing that I can think of is to "#ifndef BOOST_NO_EXCEPTIONS" comment out all "try {" clauses and "} catch { ... }" blocks in cpp-netlib. This should be a safe assumption as the user supplied throw_exception is never allowed to return (so no need to handle error conditions). An example of commenting out the "try ... catch" stuff can be seen in this patch to the thread library. https://svn.boost.org/trac/boost/attachment/ticket/2100/boost_thread_BOOST_NO_EXCEPTIONS_20110306.diff With those two changes, I believe that compilation should succeed with -fno-exceptions. Thanks for your work on this amazing library. -Andy |