Course Overview
Pure C++20 Mastery is a comprehensive, standards-focused deep dive into the C++20 language and standard library.
Unlike most courses that combine older C++ standards with a brief C++20 overview, this course is entirely dedicated to C++20 — covering core language features, new library utilities, concurrency primitives, and the programming models introduced in this standard.
This course assumes some familiarity with modern C++ (C++11/14/17).
It does not repeat language fundamentals, object-oriented basics, or pre-C++20 material.
Core C++20 language features
You will learn all major C++20 language additions, including:
consteval and constinit
Designated initializers
Lambda improvements, including usage in unevaluated contexts
Modern enum enhancements
The three-way comparison operator (<=>) and defaulted comparisons
These features are explained in terms of design intent, correct usage, and real-world implications.
Modules — a new compilation and reuse model
C++20 introduces modules, fundamentally changing how C++ code is structured and reused.
This course covers:
Why modules were introduced
How they differ from header-based designs
How to define, export, and import modules
Build-time, dependency, and architectural implications
Practical limitations and current tooling realities
Ranges — algorithms redesigned
C++20 ranges are not just syntactic sugar.
You’ll gain a deep understanding of the ranges model, including:
Views and lazy evaluation
Range adaptors and composition
Eliminating iterator boilerplate (begin() / end())
Writing safer, more expressive algorithm pipelines
Performance and correctness considerations
Concepts — constraints done right
Concepts introduce a clean, expressive way to constrain templates.
You’ll learn:
Why concepts replace many SFINAE patterns
Concepts vs enable_if
Writing meaningful constraints
Improving compile-time diagnostics
Designing robust generic interfaces
Coroutines — resumable functions and cooperative concurrency
C++20 coroutines introduce a new execution model based on suspendable and resumable functions.
This course explains:
Coroutine mechanics and execution flow
Promise types, awaitables, and suspension points
How coroutines enable asynchronous and cooperative concurrency
How coroutines relate to threads and executors
When coroutines are appropriate — and when they are not
C++20 concurrency & synchronization utilities
In addition to language features, this course provides in-depth coverage of new C++20 concurrency facilities, including:
std::jthread and cooperative cancellation
Stop tokens and structured thread lifetime management
Modern synchronization primitives introduced or enhanced in C++20 such as latch, barrier & semaphore.
Safer, more expressive concurrency patterns enabled by the new library design
This section focuses on why these utilities were added, how they improve correctness, and how they change modern C++ concurrency design.
New and updated C++20 library utilities
You will also explore important C++20 standard library additions, such as:
Formatting facilities (std::format)
New utility types and helper classes such as std::osyncstream, std::source_location, std::span, etc.
Library changes that complement ranges, concepts, and coroutines
Practical usage patterns and limitations
These topics are often skipped or briefly mentioned in other courses — here they are treated as first-class C++20 features.
Update [12-Dec-2024] Added content on new C++20 library features & classes
Update [07-Dec-2024] Added concurrency support videos
Update [26-Nov-2024] Added quiz for all sections
Update [09-Nov-2024] Added more videos with examples of views in Ranges section
FAQ
FAQ area empty
Course curriculum
Chương 1 Introduction to C++20 4 bài · 4 phút
Chương 2 Core Language Changes 16 bài · 1 giờ 20 phút
- Source Code Học thử
- Designated Initializers - I Học thử 5:07
- Designated Initializers - II Học thử 6:29
-
Designated Initializers - III 7:06
-
Range-based For Loop - I 4:39
-
Range-based For Loop - II 6:38
-
UTF-8 - I 2:33
-
UTF-8 - II 6:14
-
Structured Bindings 5:54
-
Constant Expressions - constexpr 8:27
-
Immediate Functions - consteval 4:07
-
Compiled-time Initialization - constinit 6:42
-
Explicit bool - I 4:38
-
Explicit bool - II 5:57
-
Explicit bool - III 5:10
-
Quiz
Chương 3 Lambda Expressions & Templates 6 bài · 30 phút
-
Source Code
-
Implicit this 4:52
-
Lambda In Unevaluated Context 7:51
-
Non-Type Template Parameters 5:34
-
Template Parameters - I 7:56
-
Template Parameters - II 3:50
Chương 4 More Core Language Changes 4 bài · 18 phút
-
Source Code
-
Attributes - I 6:48
-
Attributes - II 7:14
-
Enums 4:10
Chương 5 Quiz 1 bài
-
Quiz
Chương 6 Text Formatting Library 11 bài · 46 phút
-
Source Code
-
Stream Formatting - I 5:48
-
Stream Formatting - II 4:21
-
C++20 Formatting Library 2:34
-
Basic Usage 4:51
-
Println Helper Implementation 2:01
-
Format Specification - Type 7:18
-
Format Specification - Fill, Alignment & Width 7:29
-
Format Specification - Number Formatting 7:19
-
Format Specification - Locale 3:51
-
Quiz
Chương 7 Concepts 11 bài · 58 phút
-
Source Code
-
Constraining Template Arguments 8:24
-
Concepts Introduction 2:55
-
Concepts Implementation 4:41
-
Concepts Usage Types 3:36
-
Abbreviated Templates 6:41
-
Requirement Types - I 5:32
-
Requirement Types - II 9:04
-
Combining Requirements 7:49
-
More Examples 9:33
-
Quiz
Chương 8 Modules 12 bài · 54 phút
-
Source Code
-
C++ Build Process Overview 9:46
-
Introduction to Modules 2:50
-
Modules Example 6:05
-
Module Naming 2:53
-
Modules Build Process 6:03
-
Declaration & Definition Separation 2:55
-
Submodules 5:28
-
Partition Modules 4:58
-
Header Units 9:03
-
Module Private Marker 4:20
-
Quiz
Chương 9 Three-way Comparison 27 bài · 2 giờ 10 phút
-
Source Code
-
Comparison Operators - I 4:44
-
Comparison Operators - II 6:58
-
Three-way Comparison Operator - I 2:38
-
Three-way Comparison Operator - II 3:20
-
Three-way Comparison Operator - III 5:08
-
Three-way Comparison Operator - IV 6:41
-
Synthesized Expressions - I 4:41
-
Synthesized Expressions - II 3:09
-
Comparisons 7:37
-
Equality Operator - I 8:20
-
Equality Operator - II 7:15
-
Equality Operator - III 6:00
-
Ordering Categories 1:52
-
Strong Ordering 6:11
-
Weak Ordering - I 5:43
-
Weak Ordering - II 6:35
-
Partial Ordering - I 2:48
-
Partial Ordering - II 4:42
-
Ordering Summary 2:33
-
Backward Compatibility 5:51
-
Utilities - I 6:04
-
Utilities - II 6:24
-
Utilities - III 6:25
-
Utilities - IV 6:49
-
Summary 1:36
-
Quiz
Chương 10 Ranges 22 bài · 1 giờ 47 phút
-
Source Code
-
Algorithms & Iterators 8:22
-
Ranges Introduction 4:04
-
Ranges Example 2:50
-
Range Concepts - I 2:41
-
Range Concepts - II 4:29
-
Range Concepts - III 5:00
-
Projections - I 4:22
-
Projections - II 7:28
-
Projections - III 5:08
-
Algorithm Return Types - I 3:20
-
Algorithm Return Types - II 4:03
-
Algorithm Return Types - III 5:27
-
Views - I 4:31
-
Views - II 5:54
-
Views - III 4:08
-
Views - IV 8:54
-
Views - V 5:06
-
View Composition 8:06
-
Pipeline 5:25
-
Range Factories 7:41
-
Quiz
Chương 11 Coroutines 28 bài · 2 giờ 33 phút
-
Source code
-
Subroutines 6:31
-
Coroutines Introduction 6:35
-
Coroutines Example 9:00
-
Coroutine Anatomy 7:20
-
Coroutine Implementation 8:31
-
Coroutine Workflow - I 6:13
-
Coroutine Workflow - II 5:18
-
Coroutine Workflow - III 4:47
-
Returning Values (co_return) 7:51
-
Generator (co_yield) 7:41
-
Awaitable 5:03
-
Awaitable implementation 8:45
-
Awaiter 2:05
-
Awaiter Implementation - I 6:39
-
Awaiter Implementation - II 2:46
-
Awaiter Methods 4:03
-
Coroutine Concurrency - I 6:19
-
Coroutine Concurrency - II 5:33
-
Coroutine Concurrency - III 6:33
-
Coroutine Concurrency - IV 7:23
-
Coroutine Concurrency - V 6:04
-
Exceptions in Coroutines 5:06
-
Initialization Stage Exceptions 4:03
-
Execution Stage Exceptions - I 4:04
-
Execution Stage Exceptions - II 5:54
-
Conclusion 2:45
-
Quiz
Chương 12 Concurrency 23 bài · 1 giờ 38 phút
-
Source Code
-
Std::jthread 2:45
-
Std::jthread Example 6:41
-
Thread Cancellation - I 6:26
-
Thread Cancellation - II 4:09
-
Thread Cancellation Callback 3:54
-
Std::stop_source 3:16
-
Stop Token & Condition Variable 6:03
-
Latch 2:17
-
Latch vs join() 2:33
-
Latch vs Condition Variable 6:50
-
Latch Example - I 4:03
-
Latch Example - II 3:32
-
Barrier 3:45
-
Barrier Example 7:29
-
Barrier Completion Callback 3:59
-
Barrier Arrive & Drop 4:02
-
Barrier Arrive & Wait 7:11
-
Semaphore 4:32
-
Semaphore Vs Condition Variable 3:56
-
Counting Semaphore 4:18
-
Binary Semaphore 6:34
-
Quiz
Chương 13 More Additions to Standard Library 15 bài · 1 giờ 4 phút
-
Source code
-
Std::osyncstream 5:30
-
Std::source_location 6:11
-
Std::span 4:34
-
Span Fixed Extent 4:28
-
Span Dynamic Extent 4:09
-
Spans As Function Parameters 5:35
-
Subspans 6:15
-
Container Helper Functions 3:47
-
Std::erase()/std::erase_if() 5:51
-
Std::bind_front() 5:55
-
Std::is_constant_evaluated 6:10
-
Std::ssize() 2:59
-
Std::contains() 3:00
-
BONUS LECTURE
Requirment
-
Basic understanding of C++11
Outcomes
-
Learn about the new C++20 language standard features
-
Migrate existing C++ codebase to C++20
-
Use coroutines to write concurrent code
-
Use modules instead of headers to modularize software
-
Use ranges library to simplify working with containers & algorithms
-
Use concepts to apply constraints on algorithms & classes
0 Student
2 Courses
0 review