TLDR Dev · ARTICLES & TUTORIALS

STD::MOVE DOESN'T MOVE ANYTHING: A DEEP DIVE INTO VALUE CATEGORIES

0xghost.dev38 min read

Summary from the TLDR Dev newsletter

`std::move` in C++ is a misnamed function that doesn't physically move data, but rather casts an expression into an rvalue reference, signaling that its resources can be "pillaged." This conversion allows move constructors and move assignment operators to efficiently transfer ownership of resources, usually by swapping pointers, instead of performing expensive deep copies.