Skip to content
jieqi's archive
Go back

C++: Value categories

Every rule here follows from one question: is this function allowed to gut its argument? Only the caller knows, so C++ sends the answer through the type system at compile time.

The rest is consequences. Which expressions carry which tag, what binds to what, why a named rvalue reference is an lvalue, and why std::move doesn’t move. Step through it.

It’s also on its own page if you want it full width.

Previous Post
C++: STL internals
Next Post
C++: Object and Storage Lifetimes