Template metaprogramming and C++20 Concepts
From SFINAE to Concepts: how to constrain templates, write type traits, and enforce compile-time contracts. Practical C++17 and C++20 patterns without academic theory.
From SFINAE to Concepts: how to constrain templates, write type traits, and enforce compile-time contracts. Practical C++17 and C++20 patterns without academic theory.
How std::variant and std::optional replace error-prone C patterns. Discriminated unions, pattern matching with std::visit, and nullable values without null pointers.
Which STL container to use and why. Cache locality, iterator stability, insertion cost, and the cases where std::vector beats every alternative.
How std::span and std::string_view work, when to use them instead of const references or raw pointers, and where they catch bugs that pointers miss.
unique_ptr, shared_ptr, weak_ptr โ what each one means, when to use which, and the ownership model that makes raw pointers safe again.