Binding Rules

Let’s learn what binding rules are for const rvalue references.

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 simply syntactically valid, but the language has clear, well-defined binding rules for it.

For our binding examples, we’ll use the following four overloads of a simple function f.

Get hands-on with 1300+ tech skills courses.