On Sunday, 15 August 2021 at 18:47:27 UTC, Tejas wrote:
Do you see anything wrong with the following `emplace`-allocated, RAII following exceptions:

[...]

Is this good enough for general use now? Any other drawbacks?

It only works if you're throwing and catching in the same function. Otherwise you are essentially returning a pointer to an expired stack frame, which is UB.

Reply via email to