-
Development ContainersCrash course docker and development containers. Problem statement and how to create a reproducible development environment. Getting started with docker and development containers.
-
Session 1: IntroductionHello, world! Why C++? A brief history. Compilation model. Core guidelines and static analysis.
-
Labo 1: Compiling Hello, world!Working with a devcontainer. Manually compiling using clang. Old style includes vs modern style modules. Using buildsystem CMake. Compiler warnings and clang-tidy.
-
Session 2: User input and Basic C++User input. Variables and Types. Initialization and Conversion. While, for, if, switch. Functions. Const and constexpr. Vector as a general purpose list.
-
Labo 2: Basic console applicationsHow to use the labo 2 devcontainer. See digitap for exercise assignments.
-
Session 3: STL containers and ErrorsSTL containers: std::array, std::unordered_map, std::span. Compile-time, link-time and run-time errors. Exceptions. Avoiding and finding errors. Design by contract.
-
Labo 3: DebuggingHow to use the vscode debugger? See digitap for exercise assignments.
-
Session 4: References and OOPSome C++ technicalities. References, function overloading and value categories. Object Oriented Programming. Classes, enums, RAII, operator overloading. The rule-of-5.
-
Labo 4: Class designDesigning the Date class. Operator overloading. Making it possible to create dates at compile time. std::chrono. See digitap for exercise assignments.
-
Session 5: Runtime polymorphismsAbstract base classes and interfaces. Pure virtual functions. Virtual destructors. Overriding functions. Copy and Move in polymorphic inheritance hierarchies.
-
Labo 5: Solutions and PolymorphismsSolutions Labo 1-4. Static constexpr, std::size_t, static_cast, std::optional, designated initializers. Exercises runtime polymorphisms. See digitap for exercise assignments.
-
Session 6: Stack and HeapCreating a vector of references to store polymorphic objects. What are the call stack and the heap? Memory fragmentation. Working safely with dynamic memory by using std::unique_ptr.
-
Labo 6: Dynamic MemoryUsing the heap to dynamically create polymorphic objects. See digitap for exercise assignments.
-
Session 7: Algorithms and LambdasFunction objects: overloading operator() to create functions with state. Lambdas: concise function objects. The capture list. Mutability. Algorithms, ranges and views.
-
Labo 7: Algorithms and LambdasCreating lambdas. Using standard algorithms, ranges and views. See digitap for exercise assignments.
-
Session 8: Namespaces and ModulesPreventing name collisions and ODR violations by using namespaces. The unnamed namespace. Modules and module fragments. Global scope, translation unit scope and module scope.
-
Labo 8: Modules and Unit TestingHow to use the labo 8 devcontainer. The Catch2 testing framework and how to run tests in vscode. Writing modules and unit tests. See digitap for exercise assignments.
-
Session 9: Templates and ConceptsMeta-programming to avoid code duplication. Class and function templates. Non-type template arguments. Using auto for function arguments. Restricting template arguments using concepts.
-
Labo 9: Template Meta-programmingClass templates, function templates and concepts. See digitap for exercise assignments.
-
Session 10: Pointers and IteratorsSmart pointers and raw pointers. Manual memory management and the ownership problem. Making custom containers work with STL algorithms using iterators. Dynamic array as an example.
-
Labo 10: Raw pointersWorking with pointers and raw new and delete. See digitap for exercise assignments.
-
Session 11: Introduction to CHello, world! Why C? A brief history. Comparing C to C++. Standard input and output
-
Labo 11: ProjectHow to use the labo 11 devcontainer. No exercises, work on project.
-
Session 12: C and ASM code in C++Naming mangling. Creating C++ functions that can be used in C code. How to make C header files compatible with C++. Inline assembly. Memory mapped devices as objects.
-
Labo 12: ProjectNo exercises, work on project.