Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_NO_EXCEPTIONS problem when C++ Exceptions are disabled
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-01-29 12:43:36


On Thu, Jan 29, 2009 at 4:19 AM, rroc <onnepoika_at_[hidden]> wrote:
>
> Hi,
> I 'm trying to create a msvc project with C++ Exceptions disabled, as well
> as defined BOOST_NO_EXCEPTIONS and _HAS_EXCEPTIONS=0.
>
> This requires me to define a custom exception routine. All of this goes
> smoothly, but there is a problem with boost. Even when the
> BOOST_NO_EXCEPTIONS is set, the following boost files:
> exception\diagnostic_information.hpp
> exception_ptr.hpp
>
> ...are using try-catch blocks and because of this give a warning: warning
> C4530: C++ exception handler used, but unwind semantics are not enabled.
>
> Am I using this somewhat wrong

If you want exceptions disabled, the only Exception library header
valid for inclusion is boost/throw_exception.hpp (though your post
prompts me to add appropriate #errors in all other Exception library
headers.)

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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