Unlock the full potential of C++20 with this deep dive into its latest features and enhancements. This course is designed for experienced C++ developers looking to master modern C++ programming techniques. You'll explore key language updates, including designated initializers, range-based loops, and UTF-8 improvements. Through structured lessons, you’ll gain hands-on experience with new capabilities such as constexpr, consteval, and constinit, making your code more efficient and expressive.
Dive into advanced topics like lambda improvements, enhanced template parameters, and expanded attributes, allowing you to write cleaner, safer, and more flexible code. Learn how concepts revolutionize template constraints, explore modules for better code organization, and harness the power of the three-way comparison operator for streamlined comparisons. The course also covers text formatting enhancements, ranges for better algorithm and iterator usage, and the transformative coroutine support in C++20.
You'll gain practical insights into concurrency improvements, new standard library additions, and tools that simplify multi-threaded programming. From std::jthread and thread synchronization mechanisms to new container helper functions, this course provides an extensive look at modern C++ development techniques.
This course is ideal for intermediate to advanced C++ developers who want to stay ahead in the evolving landscape of software development. A solid understanding of C++17 is recommended, as the course assumes familiarity with prior C++ versions. Whether you're a systems programmer, game developer, or high-performance software engineer, this course will equip you with the knowledge and skills to write cutting-edge C++20 code.
Overview
Syllabus
- Introduction to C++20
- In this module, we will provide an overview of the course and highlight the major enhancements in C++20. This introduction will set the foundation for understanding the language updates and how they contribute to cleaner, more efficient, and modern C++ programming.
- Core Language Changes
- In this module, we will explore foundational changes in C++20 that enhance code clarity, initialization, and compile-time evaluations. By diving into new features such as designated initializers, UTF-8 support, and constexpr improvements, we’ll learn how these updates streamline development and reduce potential errors.
- Lambda Expressions & Templates
- In this module, we will explore enhancements in lambda expressions and templates that improve both syntax and functionality. By understanding implicit this, lambda expressions in unevaluated contexts, and new template parameter features, we’ll gain a deeper grasp of modern C++ programming techniques.
- More Core Language Changes
- In this module, we will examine additional refinements to the core language, including new attributes and improved enum types. These updates contribute to better-structured, more maintainable code, ensuring greater clarity and correctness in modern C++ development.
- Text Formatting Library
- In this module, we will explore the powerful text formatting capabilities introduced in C++20. By leveraging the new formatting library and enhanced stream formatting options, we’ll learn how to produce cleaner, more readable, and internationally adaptable output.
- Concepts
- In this module, we will delve into the concepts feature of C++20, which improves the clarity and safety of template programming. By understanding how concepts refine template constraints and how abbreviated templates simplify syntax, we’ll write more maintainable and error-resistant code.
- Modules
- In this module, we will explore the C++20 modules feature, a revolutionary change in the way C++ projects are structured and compiled. By working through practical examples, we’ll learn how to leverage modules to enhance code modularity and compilation efficiency.
- Three-way Comparison
- In this module, we will dive into the new three-way comparison operator and its impact on relational operations in C++20. By learning about synthesized expressions and ordering categories, we’ll gain a deeper understanding of how these enhancements improve comparison logic and code consistency.
- Ranges
- In this module, we will explore the powerful ranges library introduced in C++20. By mastering views, projections, and new algorithm return types, we’ll unlock more concise, readable, and efficient ways to process data.
- Coroutines
- In this module, we will dive into coroutines, a game-changing feature for asynchronous programming in C++20. By understanding coroutine workflows, concurrency handling, and exception management, we’ll learn how to write efficient and scalable asynchronous code.
- Concurrency
- In this module, we will explore concurrency improvements in C++20 that simplify multithreading. By understanding new threading primitives and synchronization tools, we’ll gain the ability to write safer, more efficient concurrent code.
- More Additions to Standard Library
- In this module, we will examine various additions to the standard library that enhance code safety, flexibility, and performance. By leveraging new utilities like std::span and std::source_location, we’ll write more modern, expressive, and efficient C++ code.
Taught by
Packt - Course Instructors