Warehouse Stock Clearance Sale

Grab a bargain today!


Sign Up for Fishpond's Best Deals Delivered to You Every Day
Go
C++ Core Guidelines ­Explained
Best Practices for Modern C++

Rating
Format
Paperback, 528 pages
Published
United States, 1 April 2022


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.

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



Part III: Appendixes 445 Appendix A: Enforcing the C++ Core Guidelines 447 Visual Studio 448 clang-tidy 450 Appendix B: Concepts 453 Appendix C: Contracts 457 Index 459

Show more

Our Price
HK$361
Ships from Europe Estimated delivery date: 6th May - 13th May from Europe
Free Shipping Worldwide

Buy Together
+
Buy together with Modernes C++ [German] at a great price!
Buy Together
HK$786

Product Description


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.

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



Part III: Appendixes 445 Appendix A: Enforcing the C++ Core Guidelines 447 Visual Studio 448 clang-tidy 450 Appendix B: Concepts 453 Appendix C: Contracts 457 Index 459

Show more
Product Details
EAN
9780136875673
ISBN
013687567X
Dimensions
22.9 x 17.8 x 1.8 centimeters (0.33 kg)

Table of Contents

List of selected C++ Core Guidelines xiii
List of figures xxiii
List of tables xxvii
Foreword xxix
Preface xxxi
Acknowledgments xxxvii
About the author xxxix

Part I: The Guidelines 1

Chapter 1: Introduction 3
Target readership 3
Aim 4
Non-aims 4
Enforcement 4
Structure 4
Major sections 5

Chapter 2: Philosophy 7

Chapter 3: Interfaces 15
The curse of non-const global variables 16
Dependency injection as a cure 18
Making good interfaces 20
Related rules 25

Chapter 4: Functions 27
Function definitions 28
Parameter passing: in and out 32
Parameter passing: ownership semantics 38
Value return semantics 42
Other functions 46
Related rules 52

Chapter 5: Classes and Class Hierarchies 53
Summary rules 54
Concrete types 58
Constructors, assignments, and destructors 59
Class hierarchies 98
Overloading and overloaded operators 117
Unions 126
Related rules 129

Chapter 6: Enumerations 131
General rules 131
Related rules 137

Chapter 7: Resource Management 139
General rules 140
Allocation and deallocation 145
Smart pointers 150
Related rules 164

Chapter 8: Expressions and Statements 165
General 166
Declarations 168
Expressions 186
Statements 199
Arithmetic 204
Related rules 210

Chapter 9: Performance 213
Wrong optimizations 214
Wrong assumptions 214
Enable optimization 218
Related rules 230

Chapter 10: Concurrency 231
General guidelines 232
Concurrency 245
Parallelism 266
Message passing 269
Lock-free programming 273
Related rules 277

Chapter 11: Error Handling 279
Design 281
Implementation 283
If you can't throw 288
Related rules 292

Chapter 12: Constants and Immutability 293
Use const 294
Use constexpr 298

Chapter 13: Templates and Generic Programming 301
Use 302
Interfaces 305
Definition 320
Hierarchies 330
Variadic templates 332
Metaprogramming 336
Other rules 362
Related rules 372

Chapter 14: C-Style Programming 375
Entire source code available 376
Entire source code not available 378

Chapter 15: Source Files 383
Interface and implementation files 384
Namespaces 391

Chapter 16: The Standard Library 397
Containers 398
Text 404
Input and output 411
Related rules 419

Part II: Supporting Sections 421

Chapter 17: Architectural Ideas 423

Chapter 18: Nonrules and Myths 427

Chapter 19: Profiles 437
Pro.typeType safety 438
Pro.boundsBounds safety 439
Pro.lifetimeLifetime safety 439

Chapter 20: Guidelines Support Library 441
Views 441
Ownership pointers 442
Assertions 443
Utilities 443
Part III: Appendixes 445

Appendix A: Enforcing the C++ Core Guidelines 447
Visual Studio 448
clang-tidy 450

Appendix B: Concepts 453

Appendix C: Contracts 457

Index 459

About the Author

Rainer Grimm has worked as a software architect, team lead, and instructor since 1999, and offered seminars on C++, Python, and proprietary software since 2002. He writes regularly on C++, Python, and Haskell, speaks at conferences on programming issues, and blogs weekly in English (modernescpp.com) and German (www.grimm-jaud.de/index.php/blog). Now an independent instructor, he offers seminars on modern C++ and Python. He has authored several books on modern C++, concurrency, and related topics.

Show more
Review this Product
Ask a Question About this Product More...
 
Look for similar items by category
Item ships from and is sold by Fishpond World Ltd.

Back to top