boostorg / context

307 stars 150 forks source link

Checked catching of detail::forced_unwind is broken #181

Closed yuri-kilochek closed 3 years ago

yuri-kilochek commented 3 years ago

Current implementation of this feature relies on copy elision in throw expression. Such elision is not mandatory, and when it doesn't happen, forced_unwind::caught remains false when the temporary is destroyed, which incorrectly triggers the assert.

I recommend removing the checking entirely.

olk commented 3 years ago

fixed, ty