Move Semantics - The Complete Guide
Nicolai Josuttis
C++11 introduced Move Semantics as its “marque feature.” This powerful feature has become a hallmark of modern C++ programming, but it complicates the language in many ways. If Scott Meyers and Herb Sutter can disagree on consequences (a topic that we’ll cover) then mere mortals can be forgiven for approaching Move Semantics with fear, uncertainty, and doubt. This one-day tutorial is valuable for those that are only beginning to learn about Move Semantics and is essential for those that are using it now.
- Move Semantics - The Basics
- Consequences of move semantics for trivial classes
- Using reference qualifiers
- Dealing with invalid moved-from states
- The relationship between all of the special member functions
- Dealing with move-only types
- Value categories or when rvalues become lvalues passed as xvalues
- Universal references and forward<>
- auto&&, decltype(auto) and perfect returning
- The dawn of noexcept and how to deal with it in practice
- Why decay<> and other type traits are needed
- Changes regarding move semantics in C++17
- Recommended patterns and idioms (including broken old C++ patterns)
- Where and why Herb Sutter and Scott Meyers disagree
Nicolai Josuttis
Nicolai Josuttis (www.josuttis.com) is well known in the C++ Community for speaking and writing with authority about C++ (being the author of "The C++ Standard Library", "C++ Templates" (coauthor), and "C+++17 - The Complete Guide") but is also an innovative presenter. He is an active member of C++ standardization committee for more than 20 years now.