Code as Fast as You Can Think
"I have only proved my code correct, not tested it" - Donald Knuth
Search This Blog
Friday, May 13, 2011
ExceptionalC++ Fun: 10. Exception Safe code. your argument might failed inside another function argument
example. Copy(stack.pop());
what if Copy failed?
not good, your stack.pop() might already popped something out, while your copy operation is not good.
things to remember: exception safety is a design, it's not just "this function is exception safe, we all good"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
Unknown
View my complete profile
No comments:
Post a Comment