Boost logo

Boost Users :

Subject: [Boost-users] boost threads without exceptions...
From: Dhirendra Pal Singh (s9_rose_at_[hidden])
Date: 2010-11-02 13:06:48


Hi Folks,
If this question has been asked already, I apologise, but I have to go back to my group and present the answer. So please bear with me.

In my current project we are using boost extensively, with exceptions disabled, until last week, when I started using boost threads. I get the following error when compiling...

***************
deepsin_at_deepsin-lnx01:~/code/boost_thread/boost_threads_eg1$ g++ -fno-exceptions -g -I /usr/local/include/boost/ t1.cpp -o t1 -lboost_thread
In file included from /usr/local/include/boost/exception_ptr.hpp:9,
                 from /usr/local/include/boost/thread/future.hpp:14,
                 from /usr/local/include/boost/thread.hpp:24,
                 from t1.cpp:3:
/usr/local/include/boost/exception/detail/exception_ptr.hpp:17:2: error: #error This header requires exception handling to be enabled.
**************

This means that any header file that includes, thread.hpp can't be compiled with -fno-exceptions. I have couple of questions if someone could help me with, I would appreciate.

Q1). https://svn.boost.org/trac/boost/ticket/2100, actually says that threads can be compiled without exceptions. Unfortunately its not the case, as I looked at top-of-trunk codebase and the problem still exists. Is this true? I mean threads require exceptions for a fact that is?. If not then can someone help me how to get it to compile without exceptions, and discard the reset of my email please.

Q2). If the answer to Q1 is "yes boost threads require exceptions", then was the decision conscious, given a ticked, was opened and closed specifically for this purpose.

Q3). Also any idea what is needed to make boost threads work without exception. I mean in terms of man-hours. If my group is okay perhaps I may be willing to work on that change, submit it back to the community, but would need some sort of understanding of the work required and time needed.

Any help would be much appreciated....

Thanks in advance...
/dev/deep

      


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net