Boost logo

Boost :

Subject: Re: [boost] Boost and exceptions
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2012-06-25 13:29:55

Daniel James wrote:
> On 25 June 2012 17:43, Stewart, Robert
> <Robert.Stewart_at_[hidden]> wrote:
> > Mathias Gaunard wrote:
> >>
> >> The whole point of the system is that there is a single
> >> place where you enable Boost.Exception support for all
> >> libraries.
> >
> > The original point of boost::throw_exception() was to
> > provide a fallback when exception support is not
> > available. That it now enables Boost.Exception support is
> > the problem for some.
> Everything's always a problem for someone. Maybe it should
> have been opt-in rather than opt-out (for the user), but I
> don't think that would be an appropriate change now.

I'm not suggesting that. Mathias was mischaracterizing the original purpose of the function.

> >> If some libraries were allowed to stick to non-
> >> Boost.Exception-enabled boost::throw_exception, then you
> >> couldn't transfer those exceptions between threads.
> >
> > You could in C++11, but that's another matter.
> >
> > There is no Boost policy that requires Boost.Exception
> > support. If you think there should be, then lobby for
> > it. Until then, library authors and maintainers can choose
> > to not support Boost.Exception
> As with writing warning free code, it isn't a policy but it
> is desirable.

Perhaps you're right, but if that isn't documented somewhere, or caught by reviewers for new libraries, then support will be spotty.

> > yet their libraries should be supported when exceptions are
> > not.
> Supported by whom?

I meant that there should be a standard Boost mechanism for such libraries to have a no-exceptions fallback without Boost.Exception support. (If the community decides that Boost.Exception support is required, then this wouldn't be needed.)

Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP


IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Boost list run by bdawes at, gregod at, cpdaniel at, john at