Boost logo

Boost :

Subject: Re: [boost] Running b2 on develop needs asynch-exceptions=on
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-03-16 23:59:50


On Monday 16 March 2015 14:49:51 Michael Caisse wrote:
> On 03/16/2015 01:21 PM, Steven Watanabe wrote:
> > AMDG
> >
> > On 03/16/2015 02:06 PM, Raffi Enficiaud wrote:
> >> The MSDN documentation
> >> (https://msdn.microsoft.com/en-us/library/1deeycx5.aspx) states that
> >> managed code needs /EHa. This is a valid use of boost.test.
> >> To my understanding it also means that removing this option would break
> >> the currently existing test using managed code to work properly with the
> >> boost.test that is built out of the box.
> >
> > I think this is unavoidable if you depend on
> > Boost.System. Wouldn't Boost.System need
> > to be built with /EHa as well? We definitely
> > shouldn't build all of Boost with /EHa by default.
>
> Would adding a usage-requirement to Boost.Test resolve this? Only
> targets that use Boost.Test would compile with the asynch-exceptions
> flag turned 'on'.

I don't think this is correct either. There are tests which do not require
/EHa and also depend on multiple different compiled libraries including Test
(e.g. tests in Thread, Log) and eventually on System as well. I'm sure most,
if not all of these tests don't care about SEH and expect normal C++
exceptions semantics.

I think, async exceptions are a very special requirement which has to be
expressed by the end user of the libraries - i.e. the test or user's
application, if it uses Boost.Build, or the user himself when he builds Boost.
By default Boost should be built with normal C++ exceptions. Yes, this means
people who use managed C++ or need stack unwinding during SEH will have to
build Boost themselves.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk