Return Value Optimization and Copy Elision in C++
Embrace the copy-free lifestyle! ā mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode Cppref on copy elision: https://en.cppreference.com/w/cpp/language/copy_elision SUPPORT ME ā --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! https://patreon.com/mCoding Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.) https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Want to donate crypto? Check out the rest of my supported donations on my website! https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, John Martin, Mutual Information BE ACTIVE IN MY COMMUNITY š --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/james.mcoding CHAPTERS --------------------------------------------------- 0:00 Intro 0:40 Return Value Optimization 3:06 Where do the copies come from? 5:23 When can copies be elided? 7:46 C++17 mandatory copy elision 9:38 Thanks