Index: thread/pthread/thread_data.hpp =================================================================== --- thread/pthread/thread_data.hpp (revision 61845) +++ thread/pthread/thread_data.hpp (working copy) @@ -79,11 +79,13 @@ void check_for_interruption() { +#ifndef BOOST_NO_EXCEPTIONS if(thread_info->interrupt_requested) { thread_info->interrupt_requested=false; throw thread_interrupted(); } +#endif } void operator=(interruption_checker&); Index: thread/win32/thread_heap_alloc.hpp =================================================================== --- thread/win32/thread_heap_alloc.hpp (revision 61845) +++ thread/win32/thread_heap_alloc.hpp (working copy) @@ -75,16 +75,20 @@ inline T* heap_new() { void* const heap_memory=allocate_raw_heap_memory(sizeof(T)); +#ifndef BOOST_NO_EXCEPTIONS try +#endif { T* const data=new (heap_memory) T(); return data; } +#ifndef BOOST_NO_EXCEPTIONS catch(...) { free_raw_heap_memory(heap_memory); throw; } +#endif } #ifndef BOOST_NO_RVALUE_REFERENCES @@ -171,16 +175,20 @@ inline T* heap_new_impl(A1 a1,A2 a2) { void* const heap_memory=allocate_raw_heap_memory(sizeof(T)); +#ifndef BOOST_NO_EXCEPTIONS try +#endif { T* const data=new (heap_memory) T(a1,a2); return data; } +#ifndef BOOST_NO_EXCEPTIONS catch(...) { free_raw_heap_memory(heap_memory); throw; } +#endif } template @@ -203,16 +211,20 @@ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4) { void* const heap_memory=allocate_raw_heap_memory(sizeof(T)); +#ifndef BOOST_NO_EXCEPTIONS try +#endif { T* const data=new (heap_memory) T(a1,a2,a3,a4); return data; } +#ifndef BOOST_NO_EXCEPTIONS catch(...) { free_raw_heap_memory(heap_memory); throw; } +#endif } Index: thread/win32/once.hpp =================================================================== --- thread/win32/once.hpp (revision 61845) +++ thread/win32/once.hpp (working copy) @@ -92,7 +92,9 @@ status=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&flag.status,running_value,0); if(!status) { +#ifndef BOOST_NO_EXCEPTIONS try +#endif { if(!event_handle) { @@ -121,6 +123,7 @@ throw_count=::boost::detail::interlocked_read_acquire(&flag.throw_count); break; } +#ifndef BOOST_NO_EXCEPTIONS catch(...) { if(counted) @@ -138,6 +141,7 @@ } throw; } +#endif } if(!counted) Index: thread.hpp =================================================================== --- thread.hpp (revision 61845) +++ thread.hpp (working copy) @@ -21,6 +21,12 @@ #include #include #include + +// boost::thread::future requires exception handling +// due to boost::exception::exception_ptr dependency + +#ifndef BOOST_NO_EXCEPTIONS #include +#endif #endif