The Elements of C++ Style

The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. Just as Strunk and White's The Elements of Style provides rules of usage for writing in the English language, this text furnishes a set of rules...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Misfeldt, Trevor, Bumgardner, Gregory, Gray, Andrew, Xiaoping, Luo
Format: E-Book Buch
Sprache:Englisch
Veröffentlicht: Cambridge, U.K Cambridge University Press 16.02.2004
Ausgabe:1
Schlagworte:
ISBN:9780521893084, 0521893089
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Abstract The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. Just as Strunk and White's The Elements of Style provides rules of usage for writing in the English language, this text furnishes a set of rules for writing in C++. The authors offer a collection of standards and guidelines for creating solid C++ code that will be easy to understand, enhance and maintain. The book provides conventions for: • formatting • naming • documentation • programming • and packaging for the latest ANSI standard of C++, and also includes discussion of advanced topics such as templates.
AbstractList The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. Just as Strunk and White's The Elements of Style provides rules of usage for writing in the English language, this text furnishes a set of rules for writing in C++. The authors offer a collection of standards and guidelines for creating solid C++ code that will be easy to understand, enhance and maintain. The book provides conventions for: • formatting • naming • documentation • programming • and packaging for the latest ANSI standard of C++, and also includes discussion of advanced topics such as templates.
The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. Just as Strunk and White's The Elements of Style provides rules of usage for writing in the English language, this text furnishes a set of rules for writing in C++. The authors offer a collection of standards and guidelines for creating solid C++ code that will be easy to understand, enhance and maintain. The book provides conventions for: • formatting • naming • documentation • programming • and packaging for the latest ANSI standard of C++, and also includes discussion of advanced topics such as templates.
The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. The authors offer a collection of standards and guidelines for creating solid C++ code, using the latest ANSI standard, that will be easy to understand, enhance and maintain.
Author Gray, Andrew
Bumgardner, Gregory
Misfeldt, Trevor
Xiaoping, Luo
Author_xml – sequence: 1
  givenname: Trevor
  surname: Misfeldt
  fullname: Misfeldt, Trevor
  organization: Centerspace, Oregon
– sequence: 2
  givenname: Gregory
  surname: Bumgardner
  fullname: Bumgardner, Gregory
– sequence: 3
  givenname: Andrew
  surname: Gray
  fullname: Gray, Andrew
  organization: IntelliChem Inc
– sequence: 4
  givenname: Luo
  surname: Xiaoping
  fullname: Xiaoping, Luo
BackLink https://cir.nii.ac.jp/crid/1130282270364639360$$DView record in CiNii
BookMark eNqFkU1Lw0AQhle0Ylt711sOIkiJzszuZrNHG-oHFHqweA2bZGNr00a7VfHfuzUFURHnMMPAM_PyznTY3rJeWsaOEM4RUF0kg7FWMUhEKRSQ2mG9b_3utieMNYdYtFiHADhEyDHaZ22OGjjnpA5Yz7lH8IFCcsHb7HgytcGwsgu7XLugLoOk3w_u1u-VPWSt0lTO9ra1y-6vhpPkJhyNr2-Ty1FoFHIQocplmcegM8sVkclISasNgqZCkJV5XsTWkJYSRRmbwlDBQWaFJiOljqXgXXbWLDZubt_ctK7WLn2tbFbXc5d6Y4igUEaK6__Zr6N49rRhn1b184t16_QTy73TlanS4SAhv5TQgycNuJzN0ny2yeitUUykgEci8sIReIw3WG4W2WpWPNg0r1dbaYR086r056v8VPhrKqv_5j8AqZqGRg
ContentType eBook
Book
Copyright Cambridge University Press 2004
Copyright_xml – notice: Cambridge University Press 2004
DBID RYH
DEWEY 005.13/3
DOI 10.1017/CBO9780511547027
DatabaseName CiNii Complete
DatabaseTitleList




DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISBN 9780511547027
0511547021
0511188013
9780511188015
1107156734
9781107156739
Edition 1
ExternalDocumentID 9781107156739
9780511547027
EBC256721
BA69387524
10_1017_CBO9780511547027
GroupedDBID -G2
089
20A
38.
A4I
A4J
AAAAZ
AABBV
AAHFW
ABARN
ABIAV
ABZUC
ACLGV
ACNOG
ADCGF
ADQZK
ADVEM
AEDFS
AERYV
AEWAL
AEWQY
AFTBM
AGSJN
AHAWV
AJFER
AJPFC
AJXXZ
AKHYG
ALMA_UNASSIGNED_HOLDINGS
AMJDZ
AMYDA
ANGWU
ASYWF
AZZ
BBABE
BFIBU
BJUTA
BPBUR
COBLI
COXPH
CYGLA
CZZ
EBACC
EBSCA
FH2
GEOUK
HF4
ICERG
IVK
IWL
JJU
MYL
NK1
NK2
OLDIN
OTBUH
OZASK
OZBHS
PP-
PQQKQ
S2A
SACVX
SN-
ZXKUE
ABESS
ABMRC
AHWGJ
RYH
ID FETCH-LOGICAL-a71304-7c5fc809be3722ab275e9a1092d42e5ccd8ea295514f8ada2d305bd92a5598543
ISBN 9780521893084
0521893089
IngestDate Wed Aug 20 03:36:15 EDT 2025
Fri Nov 08 04:05:44 EST 2024
Wed Dec 10 09:47:15 EST 2025
Fri Jun 27 00:18:44 EDT 2025
Fri Feb 21 02:34:45 EST 2025
Wed Sep 13 03:21:49 EDT 2023
IsPeerReviewed false
IsScholarly false
LCCN 2003061316
LCCallNum_Ident QA76.73.C153 E28 2004
Language English
LinkModel OpenURL
MergedId FETCHMERGED-LOGICAL-a71304-7c5fc809be3722ab275e9a1092d42e5ccd8ea295514f8ada2d305bd92a5598543
Notes Includes bibliographical references (p. 171-172) and index
OCLC 319033327
PQID EBC256721
PageCount 192
ParticipantIDs askewsholts_vlebooks_9781107156739
askewsholts_vlebooks_9780511547027
proquest_ebookcentral_EBC256721
nii_cinii_1130282270364639360
cambridge_corebooks_10_1017_CBO9780511547027
cambridge_cbo_10_1017_CBO9780511547027
PublicationCentury 2000
PublicationDate 20040216
2004
2009-09-01
2004-02-16
PublicationDateYYYYMMDD 2004-02-16
2004-01-01
2009-09-01
PublicationDate_xml – month: 02
  year: 2004
  text: 20040216
  day: 16
PublicationDecade 2000
PublicationPlace Cambridge, U.K
PublicationPlace_xml – name: Cambridge, U.K
– name: Cambridge
PublicationYear 2004
2009
Publisher Cambridge University Press
Publisher_xml – name: Cambridge University Press
SSID ssj0000145343
Score 1.9336159
Snippet The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. Just as...
The Elements of C++ Style, first published in 2004, is for all C++ practitioners, especially for those working in teams where consistency is critical. The...
SourceID askewsholts
proquest
nii
cambridge
SourceType Aggregation Database
Publisher
SubjectTerms C++ (Computer program language)
Programming languages (Electronic computers)
TableOfContents 61. Define Subclasses So They May be Used Anywhere Their Superclasses May be Used -- The Liskov Substitution Principle -- The Open-Closed Principle -- 62. Use Inheritance for "is a" Relationships and Containment for "has a" Relationships -- 63. Avoid Multiple Inheritance -- 6.3 Thread Safety and Concurrency -- 64. Design for Reentrancy -- 65. Use Threads only Where Appropriate -- 66. Avoid Unnecessary Synchronization -- 67. Do Not Synchronize Access to Code That Does Not Change Shared State -- 7. Programming Conventions -- 7.1 Preprocessor -- 68. Use '#include"..."' for Collocated Header Files and '#include&lt -- ...&gt -- ' for External Header Files -- 69. Place Preprocessor Include Guards in Header Files -- 70. Use…Comments to Hide Blocks of Code -- 71. Use Macros Sparingly -- 72. Add a Semicolon after Every Statement Expression Macro -- 73. Use Macros to Capture the Current File Name and Line Number -- 74. Do Not Use "#define" to Define Constants---Declare static const Variables Instead -- 7.2 Declarations -- 75. Use Portable Types for Portable Code -- 76. Use Typedefs to Simplify Complicated Type Expressions -- 77. Create a Zero-Valued Enumerator to Indicate an Uninitialized, Invalid, Unspecified, or Default State -- 78. Do Not Define Enumerations Using Macros or Integer Constants -- 7.3 Scoping -- 79. Declare Enumerations within a Namespace or Class -- 80. Declare Global Functions, Variables, or Constants as Static Members of a Class -- 81. Declare for-loop Iteration Variables Inside of for Statements -- 7.4 Functions and Methods -- 82. Use an Enumeration Instead of a Boolean to Improve Readability -- 83. Use an Object Pointer Instead of a Reference if a Function Stores a Reference or Pointer to the Object -- 84. Accept Objects by Reference and Primitive or Pointer Types by Value -- 85. Use a const char* for Narrow Character String Parameters
115. Implement a Boolean Operator in Terms of Its Opposite -- 7.8 Templates -- 116. Use Templates Instead of Macros to Create Parameterized Code -- 117. Do Not Use CV-Qualified Types as Template Parameters -- 7.9 Type Safety, Casting, and Conversion -- 118. Use C++ Casting Operators Instead of C-style Casts -- 119. Avoid Type Casting and Do Not Force Others to Use It -- 120. Use static_cast&lt -- &gt -- to Expose Non-Intuitive Implicit Conversions -- 121. Do Not Use reinterpret_cast&lt -- &gt -- in Portable Code -- 122. Only Use const_cast&lt -- &gt -- on "this" or When Dealing with Non-Const-Correct Code -- 123. Never Use dynamic_cast&lt -- &gt -- as a Substitute for Polymorphism -- 124. Use dynamic_cast&lt -- &gt -- to Restore Lost Type Information -- 125. Always Treat String Literals as const char* -- 126. Use C++ Streams Instead of stdio Functions for Type Safety -- 127. Test All Type Conversions -- 7.10 Initialization and Construction -- 128. Initialize All Variables -- 129. Do Not Rely on the Order of Initialization of Global Objects -- 130. Always Construct Objects in a Valid State -- 131. Initialize Member Variables in the Initializer List -- 132. Initialize Member Variables in the Order They are Declared -- 133. Indicate When the Declaration Order of Data Members is Significant -- 134. Always List any Superclass Constructors in the Initializer List of a Subclass Constructor -- 135. Do Not Call Virtual Functions in Constructors and Destructors -- 136. Declare and Initialize Static Variables within Functions -- 137. Zero Pointers after Deletion -- 138. Use the new and delete Operators Instead of malloc() and free() -- 7.11 Statements and Expressions -- 139. Do Not Rely on Operator Precedence in Complex Expressions -- 140. Use Block Statements in Control Flow Constructs -- 141. Do Not Test for Equality with True
Cover -- Half-title -- Title -- Copyright -- Contents -- Preface -- Audience -- 1 Introduction -- Disclaimer -- Acknowledgments -- 2 General Principles -- 1. Adhere to the Style of the Original -- 2. Adhere to the Principle of Least Astonishment -- 3. Do It Right the First Time -- 4. Document any Deviations -- 3. Formatting Conventions -- 3.1 Indentation -- 5. Use Indented Block Statements -- 6. Indent Statements after a Label -- 7. Choose One Style for Brace Placement -- 8. Break Long Statements into Multiple Lines -- 9. Include White Space -- 10. Do Not Use "Hard" Tabs -- 4. Naming Conventions -- 4.1 Preprocessor Macro Names -- 11. Use UPPERCASE and Underscores for Preprocessor Macro Names -- 12. Add a Unique Prefix to Macro Names -- 4.2 Type and Constant Names -- 13. Use "UpperCamelCase" for Classes, Constants, Structures, Enumerations, and Typedefs -- 14. Use Nouns to Name Compound Types -- 15. Pluralize the Names of Collections -- 4.3 Function Names -- 16. Use "lowerCamelCase" for Function Names -- 17. Use Verbs to Name Functions -- 18. Use "is", "set", and "get" to Name Accessor and Mutator Functions -- 4.4 Variable and Parameter Names -- 19. Use "lowerCamelCase" for Variable and Function Parameter Names -- 20. Use Nouns to Name Variables -- 21. Add a Prefix or Suffix to Member Variable Names to Distinguish Them from Other Variables -- 22. Name All Function Parameters -- 23. Use "other" for Parameter Names in Copy Constructors and Assignment Operators -- 24. Give Function Parameters the Same Name as the Member Variables You Assigned Them to -- 4.5 General -- 25. Use Meaningful Names -- 26. Use Familiar Names -- 27. Avoid the Use of Digits within Names -- 28. Avoid Excessively Long Names -- 29. Join the Vowel Generation-Use Complete Words -- 30. Use "lowerCamelCase" for Abbreviations -- 31. Do Not Use Case to Differentiate Names
142. Replace Repeated, Non-Trivial Expressions with Equivalent Methods
86. Pass Enumerator Values, Not Integer Constants -- 87. Do Not Use void* in a Public Interface -- 88. Use Inline Functions Instead of Macros -- 89. Inline Only the Simplest of Functions -- 90. Factor Functions to Allow Inlining of Trivial Cases -- 7.5 Classes -- 91. Define Small Classes and Small Methods -- 92. Build Fundamental Classes from Standard Types -- 93. Avoid the Use of Virtual Base Classes in User-Extensible Class Hierarchies -- 94. Declare the Access Level of All Members -- 95. Declare All Member Variables Private -- 96. Avoid the Use of Friend Declarations -- 7.6 Class Members -- 97. Declare an Explicit Default Constructor for Added Clarity -- 98. Always Declare a Copy Constructor, Assignment Operator, and Destructor if the Class can be Instantiated -- 99. Always Implement a Virtual Destructor If Your Class May be Subclassed -- 100. Make Constructors Protected to Prohibit Direct Instantiation -- 101. Make Constructors Private to Prohibit Derivation -- 102. Declare a Private operator new () to Prohibit Dynamic Allocation -- 103. Declare a Protected or Private Destructor to Prohibit Static or Automatic Allocation -- 104. Declare Single-Parameter Constructors as explicit to Avoid Unexpected Type Conversions -- 105. Use Default Arguments to Reduce the Number of Constructors -- 106. Do Not Overload Non-Virtual Methods in Subclasses -- 107. Declare Virtual Methods Protected and Call Them from Public Non-Virtual Methods -- 108. Keep Your Functions "const-correct" -- 109. Use Object Pointers and References in Class Declarations -- 7.7 Operators -- 110. Adhere to the Natural Semantics of Operators -- 111. Do Not Overload… -- 112. Invoke the Superclass Assignment Operator(s) in the Assignment Operator of a Subclass -- 113. Implement Copy-Safe and Exception-Safe Assignment Operators -- 114. Define Binary Operators Outside of a Class
5. Documentation Conventions -- 32. Document Your Software Interface for Those Who Must Use It -- 33. Document Your Implementation for Those Who Must Maintain It -- 34. Keep Your Comments and Code Synchronized -- 35. Embed Application Program Interface (API) Reference Documentation in Your Source Code -- 36. Generate API Reference Documentation Directly from the Source Code -- 37. Document All Significant Software Elements -- 38. Document Software Elements as Early as Possible -- 39. Use Block Comments to Describe the Programming Interface -- 40. Use One-Line Comments to Explain Implementation Details -- 41. Use a Single Consistent Format and Organization for All Documentation Comments -- 42. Provide a Summary Description of Every Declared Element -- 43. Document the Interface Exposed by Every Function -- 44. Document Thread Synchronization Requirements -- 45. Provide Examples to Illustrate Common and Proper Usage -- 46. Document Important Preconditions, Postconditions, and Invariant Conditions -- 47. Document Known Defects and Deficiencies -- 48. Use the Active Voice to Describe Actors and Passive Voice to Describe Actions -- 49. Use "this" Rather Than "the" When Referring to Instances of the Current Class -- 50. Explain Why the Code Does What It Does -- 51. Avoid the Use of End-Line Comments -- 52. Label Closing Braces in Highly Nested Control Structures -- 53. Add a "fall-through" Comment between Two case Labels if no break Statement Separates Those Labels -- 54. Use Keywords to Mark Pending Work, Unresolved Issues, Defects, and Bug Fixes -- 6. Programming Principles -- 6.1 Engineering -- 55. Do Not be Afraid to Do Engineering -- 56. Choose Simplicity over Elegance -- 57. Do Not Use a Feature of C++ just "because it is there" -- 58. Recognize the Cost of Reuse -- 59. Program by Contract -- 6.2 Class Design -- 60. Keep Classes Simple
Title The Elements of C++ Style
URI http://dx.doi.org/10.1017/CBO9780511547027
https://doi.org/10.1017/CBO9780511547027?locatt=mode:legacy
https://cir.nii.ac.jp/crid/1130282270364639360
https://ebookcentral.proquest.com/lib/[SITE_ID]/detail.action?docID=256721
https://www.vlebooks.com/vleweb/product/openreader?id=none&isbn=9780511547027
https://www.vlebooks.com/vleweb/product/openreader?id=none&isbn=9781107156739&uid=none
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV3db9MwELdY4YG9ML60MAYRAl5KpNR24vhxiQpISBsPBe0tsmMHRXQJarpq--93dpy0ZHyIB6TKaq2T09zPsu_s390h9FrECmumZECSggdg30pYB7UOCOFRaeptg4AtNsFOT5Pzc_7ZZVlsbTkBVtfJ1RX_8V-hhj4A24TO_gPcw6DQAd8BdGgBdmhHFvHwc4u47tjglp-RvcEpfKbt-nq5ZbhWbamXyi69i5XeNAM5N728-AbTxQXA9LErAz1HXI_4j_1RAR0dFfwyCmyX6dE5lSacF6yYsCvddmuJ7fIyZemZFTXZfFjYhfePElenJzEn4A5huof2WAye8d0P87Mvn4YjMHOjSShxEcT2kdzlRBr-grtZNlm-x4_cR_ui_Q5bAWwT63Y3NwbYCXVV3dpdrcmwOEATE0byEN3R9SP0oC-e4bu19DHyAC6_h8tvSj-bTn0L1RP09f18kX0MXJ2KQICLD2pmhWHChVxqwjAWErNIczELOVYU66goVKIF5sY4LROhBFawykrFsTDp8SNKnqJJ3dT6EPlgTRbwliWV0F_yUCoVUkIjVUYy5CL20Kudl843S3un3uY_aeYPQsbdB5edEe6ht4PC8kI2ecf3Y_lYzx56tyPYrNxgvxc_BuXnRWXambkXBxvUpHmjYAyTOPTQyx6W3A7lWMj5PM3A_mZ49uwvIxyh-9vZ_RxN1qtLfYzuFZt11a5euFl2A8AbU7s
linkProvider ProQuest Ebooks
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.title=The+elements+of+C%2B%2B+style&rft.au=Misfeldt%2C+Trevor&rft.au=Bumgardner%2C+Gregory&rft.au=Gray%2C+Andrew&rft.date=2004-01-01&rft.pub=Cambridge+University+Press&rft.isbn=9780521893084&rft_id=info:doi/10.1017%2FCBO9780511547027&rft.externalDocID=BA69387524
thumbnail_m http://cvtisr.summon.serialssolutions.com/2.0.0/image/custom?url=https%3A%2F%2Fassets.cambridge.org%2F97805218%2F93084%2Fcover%2F9780521893084.jpg
http://cvtisr.summon.serialssolutions.com/2.0.0/image/custom?url=https%3A%2F%2Fvle.dmmserver.com%2Fmedia%2F640%2F97805115%2F9780511547027.jpg
http://cvtisr.summon.serialssolutions.com/2.0.0/image/custom?url=https%3A%2F%2Fvle.dmmserver.com%2Fmedia%2F640%2F97811071%2F9781107156739.jpg