Curriculum for this repository. For the quickstart, see the main README. For pedagogy (Q/A/R, instrumentation), see Teaching Method.
These exercises assume you can read and write C++ at a working-engineer level (classes, templates at a basic level, STL, building with CMake). They are not a first programming course.
- New to advanced topics but solid on basics: Use Cursor with
"profile: junior"for gentler explanations and proactive hints; you still work the same tests. - Absolute beginners: Use an introductory C++ resource first, then return here for ownership, concurrency, and related depth.
The project requires C++20. Lesson comments may still name the ISO C++ revision that introduced a feature, without changing the build standard.
Each row is a learning_* directory. Registered tests are targets listed in that module’s CMakeLists.txt and run under ctest. Sources on disk may include extra .cpp files not yet wired into CMake.
| Module | Registered tests | Notes |
|---|---|---|
| learning_shared_ptr | 16 | 16 .cpp files under tests/ (all registered). |
| learning_memory | 4 | Placement new, allocators, pools, alignment. |
| learning_modern_cpp | 8 | Modern C++ evolution (by lesson); C++20 required. |
| learning_raii | 4 | Scope guards, handles, custom managers, pointers from scratch. |
| learning_move_semantics | 5 | Value categories, move, forward, move-only types. |
| learning_error_handling | 5 | Exceptions, optional/result, noexcept, etc. |
| learning_stl | 5 | Containers, iterators, algorithms, comparators, invalidation. |
| learning_concurrency | 5 | Requires Threads::Threads. |
| learning_design_patterns | 4 | Creational, structural, behavioral, modern idioms. |
| learning_templates | 6 | Specialization, SFINAE, variadics, traits, etc. |
| learning_performance | 6 | Profiling, cache layout, elision, SSO, constexpr, benchmarks. |
| learning_debugging | 3 | GoogleMock, debugging techniques, benchmark exercise. |
| learning_deadlocks | 4 | Four deadlock suites are part of default ctest; several scenario cases are intentionally disabled while remaining fixes are in progress. |
| examples | 1 | test_try_it_out — good first run after build. |
| profile_showcase | 1 | Demonstrates move instrumentation. |
Also: Root CMakeLists.txt sets CMAKE_CXX_STANDARD to 20. Prefer cmake --preset gcc (or clang); see BUILDING.md for CMake version notes.
Dependencies are soft; adjust for your goals.
- Orientation — Build the project, run
./build/<preset>/examples/test_try_it_out(for example./build/gcc/examples/test_try_it_outaftercmake --preset gcc). - Ownership baseline —
learning_shared_ptr(thenlearning_raii/learning_memoryas needed). - Move semantics —
learning_move_semantics(pairs well after shared_ptr). - Modern syntax and STL —
learning_modern_cpp,learning_stl. - Error handling and templates —
learning_error_handling,learning_templates(order flexible). - Concurrency —
learning_concurrencyafter you are comfortable with mutex/RAII basics. - Deadlocks (advanced lab) — Work through
learning_deadlocksscenarios one file at a time; some cases are intentionally disabled until remaining fixes are completed. - Patterns, performance, debugging —
learning_design_patterns,learning_performance,learning_debuggingin any order that matches your projects.
Estimates assume focused study; your pace will vary.
| Area | Indicative hours | Comment |
|---|---|---|
| Shared pointers + RAII + memory | 25–45 | Largest conceptual load for many learners. |
| Move semantics | 12–16 | Five registered tests. |
| Modern C++ + STL | 25–35 | Eight + five test files. |
| Concurrency + (optional) deadlocks | 20–35+ | Five concurrency tests; deadlocks add substantial lab time when enabled. |
| Templates | 25–35 | Steep curve; do after moves/STL if possible. |
| Error handling, patterns, performance, debugging | 40–60 combined | Mix and match. |
Full pass over all registered material is on the order of roughly 150–250+ hours depending on depth and whether you enable deadlock exercises.
After working through the modules you care about, you should be better able to:
- Reason about ownership, lifetimes, and aliasing with observable checks (tests,
EventLogwhere used). - Use move semantics and forwarding deliberately.
- Navigate concurrency pitfalls (ordering,
condition_variable, lock-free basics at the level of these tests). - Read and write template code with SFINAE/traits patterns reflected in the suite.
- Apply RAII, error-handling trade-offs, and STL invalidation and complexity considerations.
- Profile and benchmark without mistaking noise for signal (see performance tests and caveats in code).
For methodology details, see Teaching Method.