Exceptional C++ Style: 40 New Engineering Puzzles, Programming Problems, and Solutions

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Exceptional C++ Style continues where Exceptional C++ and More Exceptional C++ left off. This book follows in the tradition of the first two: It delivers new material, organized in bite-sized Items and grouped into themed sections. Readers of the first two books will find some familiar section themes, now including new material, such as exception safety, generic programming, and optimization and memory management techniques. The books overlap in structure and theme, not in content. This book continues the strong emphasis on generic programming and on using the C++ standard library effectively, including coverage of important template and generic programming techniques. Sutter's goal for this third and final book in his set is to present case studies that pull together themes from the previous books. This book also covers important points presented at the C++ Standard Committee where corrections to the Standard have been discussed and accepted.

Author(s): Herb Sutter
Publisher: Addison-Wesley Professional
Year: 2004

Language: English
Pages: 325

Table of Contents
Preface
Style or Substance?
The Exceptional Socrates
What I assume You Know
How to Read This Book
##. The Topic of This Item
Acknowledgments
Chapter 2. The String Formatters of Manor Farm, Part 1: sprintf
Solution
Chapter 4. Standard Library Member Functions
Solution
Chapter 6. Flavors of Genericity, Part 2: Generic Enough?
Solution
Chapter 8. Befriending Templates
Solution
Part 1 - Generic Programming and the C++ Standard Library
Chapter 1. Uses and Abuses of vector
Solution
Chapter 3. The String Formatters of Manor Farm, Part 2: Standard (or Blindingly Elegant) Alternatives
Solution
Chapter 5. Flavors of Genericity, Part 1: Covering the Basis [sic]
Solution
Chapter 7. Why Not Specialize Function Templates?
Solution
Chapter 9. Export Restrictions, Part 1: Fundamentals
Solution
A Tale of Two Models
Illustrating the Issues
Export InAction [sic]
Issue the First: Source Exposure
Issue the Second: Dependencies and Build Times
Summary
Chapter 10. Export Restrictions, Part 2: Interactions, Usability Issues, and Guidelines
Solution
Chapter 12. Exception Safety: Is It Worth It?
Solution
Part 2 - Exception Safety Issues and Techniques
Chapter 11. Try and Catch Me
Solution
Chapter 13. A Pragmatic Look at Exception Specifications
Solution
Chapter 15. Uses and Abuses of Access Rights
Solution
Chapter 17. Encapsulation
Solution
Chapter 19. Enforcing Rules for Derived Classes
Solution
Chapter 21. Containers in Memory, Part 2: How Big Is It Really?
Solution
Part 3 - Class Design, Inheritance, and Polymorphism
Chapter 14. Order, Order!
Solution
Chapter 16. (Mostly) Private
Solution
Chapter 18. Virtuality
Solution
Part 4 - Memory and Resource Management
Chapter 20. Containers in Memory, Part 1: Levels of Memory Management
Solution
Chapter 22. To new, Perchance to tHRow, Part 1: The Many Faces of new
Solution
In-Place, Plain, and Nothrow new
Class-Specific new
Class-Specific new
Summary
Chapter 23. To new, Perchance to tHRow, Part 2: Pragmatic Issues in Memory Management
Solution
Chapter 25. inline Redux
Solution
Chapter 27. Data Formats and Efficiency, Part 2: (Even Less) Bit-Twiddling
Solution
Chapter 29. Is It Initialization?
Solution
Chapter 31. Amok Code
Solution
Chapter 33. Operators, Operators Everywhere
Solution
Chapter 35. Generic Callbacks
Solution
Chapter 37. Monoliths "Unstrung," Part 1: A Look at std::string
Solution
Summary
Chapter 38. Monoliths "Unstrung," Part 2: Refactoring std::string
Solution
Chapter 39. Monoliths "Unstrung," Part 3: std::string Diminishing
Solution
Chapter 40. Monoliths "Unstrung," Part 4: std::string Redux
Solution
Part 5 - Optimization and Efficiency
Chapter 24. Constant Optimization?
Solution
Solution
Solution
Part 6 - Traps, Pitfalls, and Puzzlers
Part 6 - Traps, Pitfalls, and Puzzlers
Solution
Chapter 30. double or Nothing
Solution
Chapter 32. Slight Typos? Graphic Language and Other Curiosities
Solution
Part 7 - Style Case Studies
Chapter 34. Index Tables
Solution
Chapter 36. Construction Unions
Solution
Bibliography