More C++ Idioms

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Preface

More C++ Idioms C++ has indeed become too "expert friendly" --- Bjarne Stroustrup, The Problem with Programming, Technology Review, Nov 2006.

Stroustrup's saying is true because experts are intimately familiar with the idioms in the language. With the increase in the idioms a programmer understands, the language becomes friendlier to him or her. The objective of this open content book is to present modern C++ idioms to programmers who have moderate level of familiarity with C++, and help elevate their knowledge so that C++ feels much friendlier to them. It is designed to be an exhaustive catalog of reusable idioms that expert C++ programmers often use while programming or designing using C++. This is an effort to capture their techniques and vocabulary into a single work. This book describes the idioms in a regular format: Name-Intent-Motivation-Solution-References, which is succinct and helps speed learning. By their nature, idioms tend to have appeared in the C++ community and in published work many times. An effort has been made to refer to the original source(s) where possible; if you find a reference incomplete or incorrect, please feel free to suggest or make improvements.

The world is invited to catalog reusable pieces of C++ knowledge (similar to the book on design patterns by GoF). The goal here is to first build an exhaustive catalog of modern C++ idioms and later evolve it into an idiom language, just like a pattern language. Finally, the contents of this book can be redistributed under the terms of the GNU Free Documentation License.

Aimed toward: Anyone with an intermediate level of knowledge in C++ and supported language paradigms

[edit] More Information

Authors | Praise | Guidelines for Authors | GNU Free Documentation License

RSS Logo

More C++ Idioms RSS 2.0




[edit] Table of Contents

  1. Adapter Template
  2. Address Of
  3. Algebraic Hierarchy Development stage: 75% (as of 12 June 2008)
  4. Attach by Initialization
  5. Barton-Nackman trick
  6. Base-from-Member Development stage: 75% (as of 6 August 2007)
  7. Boost mutant
  8. Calling Virtuals During Initialization Development stage: 75% (as of 6 August 2007)
  9. Dynamic Binding During Initialization Development stage: 75% (as of 6 August 2007)
  10. Capability Query Development stage: 75% (as of 6 January 2008)
  11. Checked delete Development stage: 75% (as of 15 August 2007)
  12. Clear-and-minimize Development stage: 75% (as of 10 August 2007)
  13. Coercion by Member Template Development stage: 100% (as of 14 August 2007)
  14. Compile Time Control Structures
  15. Computational Constructor
  16. Concrete Data Type Development stage: 75% (as of 17 March 2008)
  17. Const auto_ptr Development stage: 75% (as of 15 August 2007)
  18. Construct On First Use Development stage: 75% (as of 6 August 2007)
  19. Construction Tracker Development stage: 75% (as of 6 August 2007)
  20. Copy-and-swap Development stage: 75% (as of 10 August 2007)
  21. Copy-on-write
  22. Counted Body (intrusive reference counting) Development stage: 75% (as of 16 November 2007)
  23. Reference Counting (intrusive) Development stage: 75% (as of 16 November 2007)
  24. Curiously Recurring Template Pattern Development stage: 75% (as of 6 August 2007)
  25. Detached Counted Body (non-intrusive reference counting) Development stage: 75% (as of 16 November 2007)
  26. Empty Base Optimization
  27. Emulated Exception
  28. enable-if Development stage: 00% (as of 21 October 2007)
  29. Envelope Letter Development stage: 75% (as of 1 February 2008)
  30. Erase-Remove Development stage: 75% (as of 17 November 2007)
  31. Examplar
  32. Execute-Around Pointer Development stage: 75% (as of 6 August 2007)
  33. Export Guard Macro
  34. Expression-template Development stage: 75% (as of 6 August 2007)
  35. Fake Vtable
  36. Fast Pimpl Development stage: 00% (as of 6 August 2007)
  37. Final Class
  38. Forward Declare First
  39. Free Function Allocators
  40. Friendship and the Attorney-Client
  41. Function Object
  42. Generic Container Idioms Development stage: 75% (as of 22 November 2007)
  43. Cheshire Cat Development stage: 75% (as of 16 November 2007)
  44. Compilation Firewall Development stage: 75% (as of 16 November 2007)
  45. Handle Body Development stage: 75% (as of 16 November 2007)
  46. Pimpl Development stage: 75% (as of 16 November 2007)
  47. Include Guard Macro Development stage: 75% (as of 3 November 2007)
  48. Inline Guard Macro Development stage: 75% (as of 3 November 2007)
  49. Inner Class Development stage: 75% (as of 31 August 2007)
  50. Int-To-Type Development stage: 75% (as of 21 September 2008)
  51. Interface Class Development stage: 75% (as of 6 January 2008)
  52. Iterator Pair Development stage: 100% (as of 28 October 2007)
  53. Making New Friends Development stage: 75% (as of 5 January 2008)
  54. Metafunction Development stage: 75% (as of 15 September 2008)
  55. Move Constructor Development stage: 100% (as of 13 August 2007)
  56. Multi-statement Macro Development stage: 75% (as of 16 February 2008)
  57. Multiple Member Initialization
  58. Named Constructor Development stage: 75% (as of 28 September 2008)
  59. Named External Argument
  60. Named Loop
  61. Named Parameter Development stage: 00% (as of 6 August 2007)
  62. Named Template Parameters
  63. Nifty Counter Development stage: 75% (as of 6 August 2007)
  64. Schwarz Counter Development stage: 75% (as of 6 August 2007)
  65. Non-copyable Mixin Development stage: 75% (as of 6 August 2007)
  66. Non-member get
  67. Non-member Non-friend Function Development stage: 00% (as of 10 March 2008)
  68. Non-throwing swap Development stage: 75% (as of 9 January 2008)
  69. Non-Virtual Interface Development stage: 75% (as of 12 June 2008)
  70. Public Overloaded Non-Virtuals Call Protected Non-Overloaded Virtuals Development stage: 75% (as of 12 June 2008)
  71. nullptr Development stage: 75% (as of 3 November 2007)
  72. Object Generator Development stage: 75% (as of 14 September 2008)
  73. Object Template
  74. Overload Set Creation
  75. Parameterized Base Class Development stage: 75% (as of 6 August 2007)
  76. Parameterized Inheritance Development stage: 75% (as of 21 August 2007)
  77. Metafunction wrapper Development stage: 100% (as of 16 August 2007)
  78. Policy Clone Development stage: 100% (as of 14 August 2007)
  79. Policy-based Class Design
  80. Polymorphic Exception Development stage: 75% (as of 28 September 2008)
  81. Recursive Type Composition
  82. Execute-Around Object Development stage: 100% (as of 6 November 2007)
  83. Resource Acquisition Is Initialization Development stage: 100% (as of 6 November 2007)
  84. Scoped Locking Development stage: 100% (as of 6 November 2007)
  85. Resource Return Development stage: 75% (as of 3 November 2007)
  86. Runtime Static Initialization Order Idioms Development stage: 75% (as of 6 August 2007)
  87. Safe bool Development stage: 75% (as of 6 August 2007)
  88. Scope Guard Development stage: 100% (as of 14 August 2007)
  89. SFINAE Development stage: 00% (as of 6 August 2007)
  90. Substitution Failure Is Not An Error Development stage: 00% (as of 6 August 2007)
  91. Shortening Long Template Names
  92. Shrink-to-fit Development stage: 75% (as of 10 August 2007)
  93. Small Object Optimization
  94. Smart Pointer Development stage: 75% (as of 17 November 2007)
  95. Storage Class Tracker
  96. Tag Dispatching Development stage: 00% (as of 21 October 2007)
  97. Temporary Base Class
  98. The result_of technique
  99. Thin Template Development stage: 75% (as of 6 August 2007)
  100. Trailing Parens for Method Chaining for Named parameter
  101. Traits Development stage: 00% (as of 21 October 2007)
  102. Type Erasure
  103. Templated Typedef Development stage: 75% (as of 14 September 2008)
  104. Type Generator Development stage: 75% (as of 14 September 2008)
  105. Type Safe Enum
  106. Type Selection
  107. Virtual Constructor Development stage: 75% (as of 17 March 2008)
  108. Virtual Friend Function Development stage: 00% (as of 6 August 2007)


Wikibook Development Stages
Sparse text 00%.svg Developing text 25%.svg Maturing text 50%.svg Developed text 75%.svg Comprehensive text: 100%.svg
Infobox/More C++ Idioms
In other languages