Advanced Programming Fundamentals
IMPORTANT!
This topic is only required for those who want to use standard containers
(std::vector, std::unordered_map) and std::string, and those who have been
explicitly told to study this or just want to learn more.
This topic is an extension of the previous topic of programming fundamentals, focusing on RAII, move semantics, some OOP elements and other C++ features.
Concepts covered:
- References (
&) - Methods,
this staticclass members- Scopes, destructors
- Ownership of memory — the idea of RAII
std::unique_ptrandstd::shared_ptr- Custom
std::vectorimplementation with RAII constparameters andconstmethods- Constructors, copy constructors
- lvalues and rvalues
- Move semantics (rvalue references
&&,std::move, move constructors) - Basic templating
- Strings: C strings,
std::string,std::string_view - Function pointers,
typedef,auto,decltype - Storing data together with functions to implement delegates,
std::function