NPRG051 - Advanced Programming in C++

Course format

In English, there is only one event in the weekly timetable, assuming the role of lectures and tutorials as needed (not necessarily regularly as suggested in the SIS schedule).

Grading & Exam

Credit is awarded for timely and correct completion of homework assignments assigned during the semester.

All the homework assignments must be written solely by the student who submits them, independently and without the use of AI tools. You may discuss the design and associated problems with your peers; however, the code must be written only by you and you shall not share the code with anyone.

Obtaining credit is a condition for admission to the exam.

The exam consists of a practical test and a subsequent oral discussion of the practical test, the homework assignments, and related areas. The oral part of the exam may be omitted if the results of the practical part clearly determine the outcome of the exam.

Timetable, slides, and online materials

Tomáš Faltín     Miroslav Kratochvíl
The timetable is approximate.
  1. February 19th Introduction. Concepts and requirements. pdf pptx C++ tutorial
  2. February 26th A note about exceptions. pdf pptx Tuples. pdf pptx Variadic templates. pdf pptx YouTube
  3. March 5th The epic story of perfect forwarding, and related issues. How to do emplace, lvalues and rvalues. pdf pptx YouTube Getting a containable type for your container (by removing references). pdf pptx Type traits and type tags in standard library. pdf pptx
  4. March 12th Homework 1 assignment. Deadline: March 26th. A short demo of remove_cv_t and a few other things, but in Prolog. Template metaprogramming tips and tricks. pdf pptx
  5. March 19th Lecture cancelled for unexpected reasons.
  6. March 26th Deduction, CTAD, and type guides. Differences of type deduction with auto, decltype, and others. Returning and accepting multiple values via structured bindings. Uniform initialization and other fun with braced initializers. pptx G4G Vimeo GitHub YouTube YouTube
  7. April 2nd Lecture cancelled.
  8. April 9th Homework 2 assignment. Deadline: April 23rd. Custom literals, spans and string_views, future standard, other small leftovers. Ranges. Helper types from std (variant, optional, ...). pptx
  9. April 16th Parallel computation on SMP machines. Low-level primitives for multi-threading: threads, jthreads, mutexes, locks and lock guards, condition variables, semaphores. Sending stuff to threads. Thread-local storage. We had a quick peek at atomics. pdf pptx