C++ Core Guidelines Explained

Best Practices for Modern C++

Paperback Engels 2022 9780136875673
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

C++ expert instructor Rainer Grimm offers accessible, practical coverage of the Core Guidelines that offer the most value to students learning the C++ programming language. Offering new insights, indispensable context, and proven C++ examples drawn from his courses and seminars, Grimm helps students get more value from the guidelines. 
The wide-ranging coverage of this text addresses C++ programming philosophy, interfaces, functions, classes, class hierarchies, enumerations, resource management, expressions, statements, performance, concurrency, error handling, constants, immutability, templates, generic programming, C-style programming, source files, the Standard Library, and more. Each section links to the original standard online, and wherever appropriate, Grimm previews advances from C++20 and C++23. With Grimm, students can use the C++ Core Guidelines to write C++ code that is more consistent, robust, and well-performing. 

Specificaties

ISBN13:9780136875673
Taal:Engels
Bindwijze:Paperback

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

List of selected C++ Core Guidelines xiii <br> List of figures xxiii <br> List of tables xxvii <br> Foreword xxix <br> Preface xxxi <br> Acknowledgments xxxvii <br> About the author xxxix <br> <br> Part I: The Guidelines 1 <br> <br> Chapter 1: Introduction 3 <br>Target readership 3 <br>Aim 4 <br>Non-aims 4 <br>Enforcement 4 <br>Structure 4 <br>Major sections 5 <br> <br> Chapter 2: Philosophy 7 <br> <br> Chapter 3: Interfaces 15 <br>The curse of non-const global variables 16 <br>Dependency injection as a cure 18 <br>Making good interfaces 20 <br>Related rules 25 <br> <br> Chapter 4: Functions 27 <br>Function definitions 28 <br>Parameter passing: in and out 32 <br>Parameter passing: ownership semantics 38 <br>Value return semantics 42 <br>Other functions 46 <br>Related rules 52 <br> <br> Chapter 5: Classes and Class Hierarchies 53 <br>Summary rules 54 <br>Concrete types 58 <br>Constructors, assignments, and destructors 59 <br>Class hierarchies 98 <br>Overloading and overloaded operators 117 <br>Unions 126 <br>Related rules 129 <br> <br> Chapter 6: Enumerations 131 <br>General rules 131 <br>Related rules 137 <br> <br> Chapter 7: Resource Management 139 <br>General rules 140 <br>Allocation and deallocation 145 <br>Smart pointers 150 <br>Related rules 164 <br> <br> Chapter 8: Expressions and Statements 165 <br>General 166 <br>Declarations 168 <br>Expressions 186 <br>Statements 199 <br>Arithmetic 204 <br>Related rules 210 <br> <br> Chapter 9: Performance 213 <br>Wrong optimizations 214 <br>Wrong assumptions 214 <br>Enable optimization 218 <br>Related rules 230 <br> <br> Chapter 10: Concurrency 231 <br>General guidelines 232 <br>Concurrency 245 <br>Parallelism 266 <br>Message passing 269 <br>Lock-free programming 273 <br>Related rules 277 <br> <br> Chapter 11: Error Handling 279 <br>Design 281 <br>Implementation 283 <br>If you can't throw 288 <br>Related rules 292 <br> <br> Chapter 12: Constants and Immutability 293 <br>Use const 294 <br>Use constexpr 298 <br> <br> Chapter 13: Templates and Generic Programming 301 <br>Use 302 <br>Interfaces 305 <br>Definition 320 <br>Hierarchies 330 <br>Variadic templates 332 <br>Metaprogramming 336 <br>Other rules 362 <br>Related rules 372 <br> <br> Chapter 14: C-Style Programming 375 <br>Entire source code available 376 <br>Entire source code not available 378 <br> <br> Chapter 15: Source Files 383 <br>Interface and implementation files 384 <br>Namespaces 391 <br> <br> Chapter 16: The Standard Library 397 <br>Containers 398 <br>Text 404 <br>Input and output 411 <br>Related rules 419 <br> <br> Part II: Supporting Sections 421 <br> <br> Chapter 17: Architectural Ideas 423 <br> <br> Chapter 18: Nonrules and Myths 427 <br> <br> Chapter 19: Profiles 437 <br>Pro.typeType safety 438 <br>Pro.boundsBounds safety 439 <br>Pro.lifetimeLifetime safety 439 <br> <br> Chapter 20: Guidelines Support Library 441 <br>Views 441 <br>Ownership pointers 442 <br>Assertions 443 <br>Utilities 443 <div> <br> </div> <div> Part III: Appendixes 445 <br> <br> Appendix A: Enforcing the C++ Core Guidelines 447 <br>Visual Studio 448 <br>clang-tidy 450 <br> <br> Appendix B: Concepts 453 <br> <br> Appendix C: Contracts 457 <br> <br> Index 459 </div>

Managementboek Top 100

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        C++ Core Guidelines Explained