Тип доклада: Доклад

Move-only C++ design

  • Доклад на английском языке

RAII usually releases all the acquired resources in our programs. But there is one resource that is never returned to us — time.

One of the most time costly mistakes we can make is creating unnecessary copies. C++11 move semantics made a move (pun intended) into the right direction. It allows us to give away data that we no longer want to use to somebody else without the penalty of creating the copy and without the risk of data races due to data having multiple users.

We are going to cover an approach to software design that allows only non-copyable move-only types called "linear types". We'll see all the C++ features that make and enforce types like these.

For this, we will have to leverage concepts (as planned for inclusion in C++20), &&-qualified member functions, etc.

  • #fp
  • #moderncpp

Спикеры

Доклады