Boost logo

Boost Users :

Subject: [Boost-users] [Exception] Issue with exception_ptr.hpp when compiling with qcc (gcc V4.4.2)
From: christopher.pohl_at_[hidden]
Date: 2010-10-04 09:39:09


Hi all,

I'm getting an error using Boost.Exception V1.44 when trying to
compile a file which #include's <boost/exception_ptr.hpp> with
a QNX 6.5.0 toolchain (gcc 4.4.2):

C:/QNX650/host/win32/x86/usr/bin/qcc -Vgcc_ntoppc -c -O -Wc,-Wall -DNDEBUG
-I. -IC:/QNX650/target/qnx6/usr/include -EB -me500v2
X:/WORKSPACE/test_boost_exception/tc1.cpp
In file included from
X:/WORKSPACE/test_boost_exception/boost/exception_ptr.hpp:9,
                 from X:/WORKSPACE/test_boost_exception/tc1.cpp:2:
X:/WORKSPACE/test_boost_exception/boost/exception/detail/exception_ptr.hpp:69:
error: looser throw specifier for 'virtual
boost::exception_detail::bad_alloc_::~bad_alloc_()'
X:/WORKSPACE/test_boost_exception/boost/exception/exception.hpp:255:
error: overriding 'virtual boost::exception::~exception() throw ()'
cc:
C:/QNX650/host/win32/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.5.0/4.4.2/cc1plus
caught signal 1

Is there an explicit destructor definition missing in the derived
class boost::exception_detail::bad_alloc_ ?

--- boost/exception/detail/exception_ptr.hpp
+++ patched/boost/exception/detail/exception_ptr.hpp
@@ -67,6 +67,7 @@
             boost::exception,
             std::bad_alloc
                 {
+ virtual ~bad_alloc_() throw() {}
                 };
 
         template <int Dummy>

Thanks for your help.

Christopher



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