Date: Sun, 25 Feb 2024 17:17:20 +0100
To be fair, you have restricted it to nothrow-constructible variables,
which covers that std::bad_alloc case. Furthermore, it wouldn't mess
up class invariants if the containers you're using all have strong
exception guarantees.
However, that really makes the feature no more powerful than literally
wrapping everything in a try {...} catch(...) {} block, and you can
easily do that with a macro already, or by just writing it out.
which covers that std::bad_alloc case. Furthermore, it wouldn't mess
up class invariants if the containers you're using all have strong
exception guarantees.
However, that really makes the feature no more powerful than literally
wrapping everything in a try {...} catch(...) {} block, and you can
easily do that with a macro already, or by just writing it out.
Received on 2024-02-25 16:17:34