Modern C++ Programming Course (C++03/11/14/17/20/23/26)
A huge thank you to all the contributors who are helping to make this course better and better day by day: @jakeheke75, @guoci, @leofracca, @ChenMiaoi, @AlanDeSmet, @indraneel-mondal, @Yuppdivyaj, @BiradarMayur2509, @Ali-Sda, @eltociear, @freakynit, @Wheest, @VaibhavSaraf, @LuccaT95, @ilovexyz, @kushnaryo8, @liyixin123, @Ingerdev, @eugenefil, @binary-manu, @dijkstracula, @arnimarj
General Improvements:
Introduction:
Preparation:
Basic Concepts I:
Basic Concepts II:
Basic Concepts III:
[[deprecated]]
attribute sectionauto _
unused variableBasic Concepts IV:
[[no_unique_address]]
sectionconstexpr
limitations sectionstatic
keyword within constexpr
functions C++23Basic Concepts V:
Object-Oriented Programming I:
Object-Oriented Programming II:
Templates and Meta-Programming I:
static_assert
with formattingTemplates and Meta-Programming II:
Debugging and Testing (previously Ecosystem I):
/analyse
Ecosystem:
Kite
ugrep
Code Conventions:
clang-tidy
to enforce a naming styleUtilities:
std::span
to this lectureIterators, Containers, and Algorithms:
Advanced Concepts I:
Advanced Concepts II:
Performance Optimizations I:
Performance Optimizations II:
Performance Optimizations III:
-fopt-info
to compiler optimization flags-fassociative-math
to floating point optimization flagsFirst of all, THANK YOU TO EVERYONE FOR YOUR INTEREST IN THIS COURSE. In the last few weeks, the course jumped from 1K to 7.6K stars ✨ 🙏
Credit to @kimsoohwan, @Zitrax, @f9rocket, @saw-lau, @mostafacs, @platypusguy, @raymondmdang, @jesustorresdev, @HaloWang, @66hash, @abzrg, @csukuangfj, @jakeheke75, @amirkhaki, @fabrizio-ottati, @dsardelic, @akobyl for pointing me out several mistakes and typos
Introduction:
Basic Concepts I:
std::print
Basic Concepts II:
Basic Concepts III:
Basic Concepts IV:
Basic Concepts V:
Object-Oriented Programming I:
Templates and Meta-programming II:
Code Conventions:
Ecosystem I:
Utilities:
std::stacktrace
librarystd::byte
Containers, Iterators, Ranges, and Algorithms:
Optimizations I:
Optimizations II:
=default
Split "Basic Concepts I" into two sets of slides to better separate the topics and improve the readability.
Basic Concepts II:
Object Oriented Programming II:
swap
semantic #11 . Thanks to @kimsoohwanCode Conventions:
Performance Optimziation II:
Basic Concepts I
Basic Concepts III
Basic Concepts IV
Object Oriented I
Object Oriented II
Translation Units II
Code Convention
Ecosystem I
Advanced Topics I
Advanced Topics II
Optimization I
Optimizations II
Optimization III
Basic Concepts I
ptrdiff_t
Basic Concepts II
Basic Concepts III
const
constexpr
section and explained the behavior of the keyword within a structureif consteval
Basic Concepts IV
=delete
sectionconsteval
lambda example[[nodiscard]]
attributeObject-Oriented Programming I
Object-Oriented Programming II
static operator()
Templates and Metaprogramming I
using
keyword sectionTemplates and Metaprogramming II
Code Conventions
Ecosystem I
Ecosystem II
hypergrep
toolUtilities
std::print
Advances Topics II
Performance Optimizations I
Performance Optimizations II
std::unreachable()
Basic Concepts I
Basic Concepts III
Object-Oriented Programming I
explicit
keyword sectionTranslation Units I
Code Convention
Ecosystem I
info
command description_FORTIFY_SOURCE=3
in stack protection sectionOptimization I
Optimization II
Thanks to @marcobergamin
List of changes:
Introduction:
Basic Concepts I:
!
as escape char)Basic Concepts II:
Basic Concepts III:
malloc
returns NULL
for zero-size allocationsvirtual
+ constexpr
usage in C++20Basic Concepts IV:
Object-Oriented Programming I:
struct
initialization to "Basic Concepts III"= default
implicationsstatic
keyword sectionObject-Oriented Programming II:
Template and Meta-programming I:
Template and Meta-programming II:
Translation Units:
const
and constexpr
variables" sectioninline
, template
, constexpr
descriptionsC++ Ecosystem:
valgrind
versiongcc
detailed warnings sectionAdvanced Topics:
Performance Optimization I:
Performance Optimization II:
[assume]
__attribute__(pure)
and __attribute__(const)
descriptionsvirtual
implicationsPerformance Optimization III:
Major changes:
Other changes:
Soul: Extended and split "Optimization I" slides Ecosystem: - added a few references Optimization I - greatly improved memory hierarchy section - added references and applied many fixes - added single-Thread Performance Trend - rewrote Ahmdal's law section - removed roofline model & bitmask slide