[go: up one dir, main page]

0% found this document useful (1 vote)
896 views3 pages

Exceptional C++ Style

This document is the table of contents for the book "Exceptional C++ Style" by Herb Sutter. It contains 40 chapters organized into sections on generic programming and the C++ standard library, exception safety issues and techniques, class design principles, memory and resource management, optimization, common programming traps and pitfalls, and case studies analyzing style in code examples. The book provides puzzles, problems and solutions related to effective C++ programming techniques and standard library usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
896 views3 pages

Exceptional C++ Style

This document is the table of contents for the book "Exceptional C++ Style" by Herb Sutter. It contains 40 chapters organized into sections on generic programming and the C++ standard library, exception safety issues and techniques, class design principles, memory and resource management, optimization, common programming traps and pitfalls, and case studies analyzing style in code examples. The book provides puzzles, problems and solutions related to effective C++ programming techniques and standard library usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Exceptional C++ Style

40 New Engineering Puzzles, Programming Problems,


and Solutions

Herb Sutter

AAddison-Wesley
Boston San Francisco New York Toronto Montreal
London Munich Paris Madrid
Capetown Sydney Tokyo Singapore Mexico City

Contents
Preface

ix

Generic Programming and the C++ Standard Library

1. Uses and Abuses of vector


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

10
16
27
31
35
42
49
59
68

79
80
85
89

99
100
104
110
119
129
139

vii

viii

Contents

Memory and Resource Management

151

20. Containers in Memory, Part 1: Levels of Memory Management


21. Containers in Memory, Part 2: How Big Is It Really?

152

22. To new, Perchance to throw, Part 1: The Many Faces of new


23. To new, Perchance to throw, Part 2:
Pragmatic Issues in Memory Management

164

Optimization and Efficiency


24. Constant Optimization?
25. inline Redux
26. Data Formats and Efficiency, Part 1: When Compression Is the Name of the Garne
27. Data Formats and Efficiency, Part 2: (Even Less) Bit-Twiddling

Traps, Pitfalls, and Puzzlers

156

173

183
184
190
199
204

213

28. Keywords That Aren't (or, Comments by Another Name)


29. Is It Initialization?

221

30. double or Nothing

227

31. Amok Code

230

32. Slight Typos? Graphic Language and Other Curiosities

235

33. Operators, Operators Everywhere

239

Style Case Studies

214

245

34. Index Tables

246

35. Generic Callbacks

258

36. Construction Unions

267

37. Monoliths "Unstrung," Part 1: A Look at std::string


38. Monoliths "Unstrung," Part 2: Refactoring std::string
39. Monoliths "Unstrung," Part 3: std::string Diminishing

286

40. Monoliths "Unstrung," Part 4: std::string Redux

305

292
301

Bibliography

315

Index

319

You might also like