Search⌘ K

Binding Rules

Explore the binding rules for const rvalue references in C++. Learn how different function overloads interact with const and non-const rvalue and lvalue references, and understand why const values must not be returned to preserve move semantics.

We'll cover the following...

What are binding rules?

The canonical signatures of the move assignment operator and the move constructor use non-const rvalue references.

But that doesn’t mean that const T&& doesn’t exist. It does, and it’s syntactically valid.

The const T&& is not ...