Universal/Forwarding References - Nicolai Josuttis - Meeting C++ 2022

Описание к видео Universal/Forwarding References - Nicolai Josuttis - Meeting C++ 2022

Universal/Forwarding References - Nicolai Josuttis - Meeting C++ 2022
Slides: https://slides.meetingcpp.com
Survey: https://survey.meetingcpp.com

Universal/forwarding references were introduced in C++11 mainly for perfect forwarding of move semantics.

However, over time they became more and more a key feature in various situations of C++.
One example is the implementation for the range-based for loop.

With C++20 they even get an important for ordinary application programmers.
You need them to be able to implement generic code that works for both containers and views.

Time to look carefully at T&&, auto&& (and maybe their cousin decltype(auto)) in detail.

Комментарии

Информация по комментариям в разработке