Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2022-02-15 02:28:42


On 15/02/2022 15:11, Emil Dotchevski wrote:
> In terms of the latter, Gavin quite literally describes Boost LEAF. It is
> indeed possible for "Boost-aware" throws to automatically detect what info
> is actually needed for error handling, and only spend cycles capturing
> that. This is exactly how leaf::on_error works.

Not quite. LEAF works explicitly through TLS rather than the local
stack, which makes it less compatible with coroutines, AFAIK.

Granted that the mechanism I proposed would probably not be
implementable without a TLS root to register with or something; while
the context objects themselves would naturally be coroutine-compatible,
a way to actually *find* which ones are still in scope in a particular
context is harder to manage without making those sorts of assumptions.

Unfortunately C++ lacks execution-context-ambient state that would work
in either scenario.


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