Avoiding Implicit Bugs in C++
1h 53mAdvanced2023-07-28
Authors

Shachar Shemesh
Course details
C++ is an extremely powerful, portable, and cost-effective programming language. But it's also rife with implicit and counter-intuitive semantics, which can introduce bugs into your program. In this course, join instructor Shachar Shemesh to learn the fundamental skills you need to know as a developer to avoid implicit bugs in C++.
Explore real-world bug-causing behaviors such as automatically generated copy constructors and copy assignment operators, cast chains with both built-in and user-defined casts, undefined behaviors, exception semantics, and destructors. Along the way, Shachar raises your overall awareness of best practices for identifying, avoiding, strategizing, controlling, and protecting your work from implicit bugs.
Explore real-world bug-causing behaviors such as automatically generated copy constructors and copy assignment operators, cast chains with both built-in and user-defined casts, undefined behaviors, exception semantics, and destructors. Along the way, Shachar raises your overall awareness of best practices for identifying, avoiding, strategizing, controlling, and protecting your work from implicit bugs.
Skills covered
C++AdvancedProgramming LanguagesOpen SourceSoftware Development
Concepts
0. Introduction
- 01 - Implicit bugs in C++
- 02 - Course structure
1. Implicit Copying
- 03 - The FD class
- 04 - You have a bug
- 05 - Locating the bug
- 06 - Exploring the implicit copy constructor
- 07 - Implementing implicit copy
- 08 - Disabling implicit copying
- 09 - Move semantics
- 10 - Assignment operators and copy-and-swap
2. Implicit Casts
- 11 - Problem 1 - Only prints once
- 12 - Constructors as implicit casts
- 13 - The explicit keyword
- 14 - Problem 2 - Corrupt file descriptor
- 15 - Explicit for casts
3. Undefined Behavior
- 16 - Parameters order evaluation
- 17 - Implementation of defined, unspecified, and undefined behavior
- 18 - Null pointer dereference
- 19 - Deconstructing null pointer example
- 20 - Why UBs are a good thing (or not)
4. Exceptions and Destructors
- 21 - The danger of a destructor throwing
- 22 - Potential solutions
Conclusion
- 23 - Philosophy of defensive class
Related courses
- Avoiding Phishing Scams
- Avoiding Legal Hot Spots: Five Legal Tips for Social Media Managers
- Avoiding Bad Decisions in Your Cloud Strategy
- Avoiding Self-Sabotage in the Workplace
- Avoiding Common Pitfalls in Customer Success Management
- Excel: Avoiding Common Mistakes (Microsoft 365)
- Tech Ethics: Avoiding Unintended Consequences
- Safeguarding Your Crypto: A Practical Guide to Avoiding Loss
Related learn paths
- Improve Your Business Analysis Skills
- Build Your Skills in Sales Development
- Visual Communication for Business Professionals
- Lead Inclusive Teams and Organizations
- Manage Remote and Hybrid Teams as a New Manager
- Human Skills for Managers Professional Certificate by LinkedIn Learning
- Master In-Demand Professional Soft Skills
- Building Critical Thinking Skills in the Age of AI