Open main menu

Wikibooks β

Table of ContentsEdit

Note: synonyms for each idiom are listed in parentheses.

  1. Address Of  
  2. Algebraic Hierarchy  
  3. Attach by Initialization  
  4. Attorney-Client  
  5. Barton-Nackman trick  
  6. Base-from-Member  
  7. Boost mutant  
  8. Calling Virtuals During Initialization  
  9. Capability Query  
  10. Checked delete  
  11. Clear-and-minimize  
  12. Coercion by Member Template  
  13. Computational Constructor  
  14. Concrete Data Type  
  15. Construct On First Use  
  16. Construction Tracker  
  17. Copy-and-swap  
  18. Copy-on-write  
  19. Intrusive reference counting (Counted Body)  
  20. Covariant Return Types TODO
  21. Curiously Recurring Template Pattern (CRTP)  
  22. Empty Base Optimization (EBO)  
  23. enable-if  
  24. Erase-Remove  
  25. Execute-Around Pointer  
  26. Exploding Return Type TODO
  27. Export Guard Macro TODO
  28. Expression-template  
  29. Fake Vtable TODO
  30. Fast Pimpl   TODO
  31. Final Class  
  32. Free Function Allocators 
  33. Function Object TODO
  34. Generic Container Idioms  
  35. Hierarchy Generation TODO
  36. Implicit conversions TODO
  37. Include Guard Macro  
  38. Inline Guard Macro  
  39. Inner Class  
  40. Int-To-Type  
  41. Interface Class  
  42. Iterator Pair  
  43. Making New Friends  
  44. Metafunction  
  45. Move Constructor  
  46. Multi-statement Macro  
  47. Member Detector  
  48. Named Constructor  
  49. Named External Argument TODO
  50. Named Loop (labeled loop)  
  51. Named Parameter  
  52. Named Template Parameters TODO
  53. Nifty Counter (Schwarz Counter)  
  54. Non-copyable Mixin  
  55. Non-member Non-friend Function   TODO
  56. Non-throwing swap  
  57. Non-Virtual Interface (NVI, Public Overloaded Non-Virtuals Call Protected Non-Overloaded Virtuals)  
  58. nullptr  
  59. Object Generator  
  60. Object Template TODO
  61. Parameterized Base Class (Parameterized Inheritance)  
  62. Pimpl (Handle Body, Compilation Firewall, Cheshire Cat)  
  63. Policy Clone (Metafunction wrapper)  
  64. Policy-based Design TODO
  65. Polymorphic Exception  
  66. Polymorphic Value Types   TODO
  67. Recursive Type Composition TODO
  68. Requiring or Prohibiting Heap-based Objects
  69. Resource Acquisition Is Initialization (RAII, Execute-Around Object, Scoped Locking)  
  70. Resource Return  
  71. Return Type Resolver  
  72. Runtime Static Initialization Order Idioms  
  73. Safe bool  
  74. Scope Guard  
  75. Substitution Failure Is Not An Error (SFINAE)  
  76. Shortening Long Template Names TODO
  77. Shrink-to-fit  
  78. Small Object Optimization TODO
  79. Smart Pointer  
  80. Storage Class Tracker TODO
  81. Tag Dispatching   TODO
  82. Temporary Base Class  
  83. Temporary Proxy  
  84. The result_of technique TODO
  85. Thin Template  
  86. Traits   TODO
  87. Type Erasure  
  88. Type Generator (Templated Typedef)  
  89. Type Safe Enum  
  90. Type Selection  
  91. Virtual Constructor  
  92. Virtual Friend Function  

Advanced idiomsEdit

These are some more advanced C++ idioms.

  1. Envelope Letter   TODO


Deprecated idiomsEdit

  1. Const auto_ptr