Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the intricacies of Return Value Optimization, implicit move, and related topics in this comprehensive conference talk from CppNow 2021. Delve into the calling convention on typical machines, understanding the "return slot" and the rationale behind C++03's copy elision in specific cases. Trace the evolution of C++ through C++11, C++17, and C++20, examining how each version improved the handling of return statements. Learn about the implications of P1155 "More Implicit Moves" and P0527 "Implicitly move from rvalue references" in C++20, and their impact on coding practices. Discover the "perfect returning idiom" and its potential applications. Analyze remaining challenges and proposed solutions, including those outlined in P2266 "Simpler Implicit Move." Gain insights from Arthur O'Dwyer, author of "Mastering the C++17 STL" and active contributor to the C++ Standards Committee, as he shares his expertise on optimizing return statements in C++.