Item 15. Writing Exception-Safe Code?A class="docLink" HREF="0201615622_part08.html#part08">Part 8
Difficulty: 9
That's it梩his is the final leg of the miniseries. The end of the line is a good place to stop and reflect, and that's just what we'll do for these last three problems.
Which technique is better梪sing StackImpl as a private base class, or as a member object?
How reusable are the last two versions of Stack? What requirements do they put on T, the contained type? (In other words, what kinds of T can our latest Stack accept? The fewer the requirements are, the more reusable Stack will be.)
Should Stack provide exception specifications on its functions?
|