Modern C++ Programming Masterclass
Programming

Course Description


This intensive 3-day masterclass guides experienced developers through modern C++ (C++11, C++14, C++17, and beyond), emphasizing best practices, advanced language features, and performance optimization techniques. Participants will learn to write clean, efficient, and maintainable C++ code using smart pointers, lambda expressions, concurrency features, and template metaprogramming, preparing them to tackle complex systems and high-performance applications.


Duration: 3 Days

Format: Instructor-led sessions with coding labs, deep dives into language features, and real-world example projects

man holding tablet computer
man holding tablet computer

Description

Course Outline


? Day 1: Modern C++ Basics and Core Language Features

Session 1: Modern C++ Overview and Tooling


  • History and evolution of C++ standards
  • Setting up a modern C++ development environment
  • Compiler options and build systems (CMake basics)


Session 2: Smart Pointers and Resource Management


  • Understanding RAII (Resource Acquisition Is Initialization)
  • Unique_ptr, shared_ptr, weak_ptr — usage patterns and pitfalls
  • Custom deleters and move semantics basics


Session 3: Lambda Expressions and Functional Programming


  • Syntax and capture modes
  • Using lambdas with STL algorithms
  • Closures, std::function, and higher-order programming


Lab Activities:


  • Refactor legacy pointer code using smart pointers
  • Write lambda expressions for common STL algorithms
  • Manage resource lifetimes safely with RAII idioms


? Day 2: Advanced C++ Features and Templates

Session 1: Concurrency and Multithreading


  • std::thread basics and thread management
  • Synchronization primitives: mutex, lock_guard, condition_variable
  • Futures, promises, and async programming


Session 2: Template Programming and Metaprogramming


  • Function and class templates
  • Variadic templates and template specialization
  • constexpr and compile-time programming


Session 3: Modern STL and Design Patterns


  • Modern STL containers and algorithms
  • Using std::optional, std::variant, and std::any
  • Common design patterns in modern C++


Lab Activities:


  • Build a multithreaded program using std::thread and synchronization
  • Write template-based utilities with variadic templates
  • Implement design patterns with modern C++ constructs


? Day 3: Performance, Best Practices, and Real-World Applications

Session 1: Performance Optimization and Memory Management


  • Move semantics and perfect forwarding
  • Cache-friendly data structures and locality of reference
  • Profiling and benchmarking tools


Session 2: Best Practices and Code Quality


  • Effective use of const, noexcept, and explicit
  • Avoiding common pitfalls and anti-patterns
  • Modern C++ coding standards and style guides


Session 3: Capstone Project and Review


  • Design and implement a small performance-critical system
  • Code review and refactoring session
  • Discussion of future trends and ongoing standardization efforts


Lab Activities:


  • Optimize an existing C++ program using move semantics
  • Profile and benchmark code for bottlenecks
  • Complete and present the capstone project