When an exception is thrown, a exception-safe fuction:
Results:
- Leak no resources
- do not make data structures corrupt.
Results:
- Although the strong guarantee is not always practical, but where possible it can be offered via copy-and-swap."pimple idiom" may also be used here.
- As said, "A chain is only as strong as its weakest link". A function can usually offer a guarantee no stronger than the weakest guarantee of the functions it calls.
prev | next
Cheers and try hosting at Linode.
No comments:
Post a Comment