C++ move semantics from scratch (2022)
cbarrete.com·17h·
Flag this post

Home Written on 2022-01-14

Today I’d like to propose a narrative for building an intuition for move semantics in C++ by describing a world in which they don’t exist and how they naturally appear as a solution for pre-C++11 problems. My goal is to provide a clear understanding of what move semantics are, without any hand waviness. We’ll start with the state of affairs in C++98, what the limitations were, what C++11 fundamentally brought to the table, how it can be used, how the language helps us use new “move semantics” idioms and finally what potential alternatives are. I am not aiming for historical accuracy, but you should be left with a good sense of what is available nowadays and why/how we got there.

There are plenty of resources talkin…

Similar Posts

Loading similar posts...