c++ - When using noexcept, how can I be certain that my code wil not throw an exception? -



c++ - When using noexcept, how can I be certain that my code wil not throw an exception? -

i understand writing exception-safe code means taking business relationship part of code can throw exception, can offer guarantee behavior when exception indeed thrown. in particular, take best write code nothrow guarantee if situation permits it.

the thing is, how know code cannot throw?

more precisely:

let's functions utilize cannot throw (they have noexcept(true) specifier, check static_assert, , implemented ensure it). knowing that, can still throw, operations on basic types or function calls throw (not function itself, function call)? can error occur without leading exception (for example, heard dividing int 0 results in error, not throw)

c++ exception

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -