-
Notifications
You must be signed in to change notification settings - Fork 82
Exceptions
Hannes Hauswedell edited this page Jul 23, 2017
·
8 revisions
Safety-Guarantee
- none or unknown
- basic (invariants of the component are preserved, and no resources are leaked)
- strong (if an exception is thrown there are no effects)
- no-throw (the code will never ever throw)
Every function starts with 1., but should at least guarantee 2.
- Always guarantee at least 2.!!!
- If you can, enforce 3.
- move construction, move assignment and swap should always be no-throw, for all other functions heed this advice: https://blog.quasardb.net/when-noexcept-2/