PRODUCT ANNOUNCEMENT
Pearson Test Prep Practice Test access codes delivered online at registration.Learn more.
Software "style" is about finding the perfect balance between overhead and functionality... elegance and maintainability... flexibility and excess. InExceptional C++ Style, legendary C++ guru Herb Sutter presents 40 new programming scenarios designed to analyze not only the what but the why and help you find just the right balance in your software.
Organized around practical problems and solutions, this book offers new insight into crucial C++ details and interrelationships, and new strategies for today's key C++ programming techniques--including generic programming, STL, exception safety, and more. You'll find answers to questions like:
Exceptional C++ Stylewill help you design, architect, and code with style--and achieve greater robustness and performance in all your C++ software.
Construction Unions: A C++ Challenge
Designing and Writing Generic Facilities: A C++ Challenge
Exceptional C++ Style: Index Tables
Download theSample Chapterrelated to this title.
前言。
GENERIC PROGRAMMING AND THE C++ STANDARD LIBRARY.
1. Uses and Abuses ofvector.
2. The String Formatters of Manor Farm, Part 1:sprintf.
3. The String Formatters of Manor Farm, Part 2: Standard (or Blindingly Elegant) Alternatives.
4. Standard Library Member Functions.
5. Flavors of Genericity, Part 1: Covering the Basis [sic].
6. Flavors of Genericity, Part 2: Generic Enough?
7. Why Not Specialize Function Templates?
8. Befriending Templates.
9. Export Restrictions, Part 1: Fundamentals.
10. Export Restrictions, Part 2: Interactions, Usability Issues, and Guidelines.
EXCEPTION SAFETY ISSUES AND TECHNIQUES.
11. Try and Catch Me.
12. Exception Safety: Is It Worth It?
13. A Pragmatic Look at Exception Specifications.
CLASS DESIGN, INHERITANCE, AND POLYMORPHISM.
14. Order, Order!
15. Uses and Abuses of Access Rights.
16. (Mostly) Private.
17. Encapsulation.
18. Virtuality.
19. Enforcing Rules for Derived Classes.
MEMORY AND RESOURCE MANAGEMENT.
20. Containers in Memory, Part 1: Levels of Memory Management.
21. Containers in Memory, Part 2: How Big Is It Really?
22. Tonew, Perchance tothrow, Part 1: The Many Faces ofnew.
23. Tonew, Perchance tothrow, Part 2: Pragmatic Issues in Memory Management.
OPTIMIZATION AND EFFICIENCY.
24. Constant Optimization?
25.inlineRedux.
26.达ta Formats and Efficiency, Part 1: When Compression Is the Name of the Game.
27. Data Formats and Efficiency, Part 2: (Even Less) Bit-Twiddling.
TRAPS, PITFALLS, AND PUZZLERS.
28. Keywords That Aren't (or, Comments by Another Name).
29. Is It Initialization?
30.doubleor Nothing.
31. Amok Code.
32. Slight Typos? Graphic Language and Other Curiosities.
33. Operators, Operators Everywhere.
STYLE CASE STUDIES.
34. Index Tables.
35. Generic Callbacks.
36. Construction Unions.
37.巨石“解开”,第1部分:一看std::string.
38. Monoliths "Unstrung," Part 2: Refactoringstd::string.
39. Monoliths "Unstrung," Part 3:std::stringDiminishing.
40. Monoliths "Unstrung," Part 4:std::stringRedux.
Bibliography.
Index.
Download theIndexfile related to this title.