- Lvalue Reference (
T&): Binds to modifiable lvalues. - Const Lvalue Reference (
const T&): Extends the lifetime of temporaries and binds to both lvalues and rvalues safely. - Rvalue Reference (
T&&): Binds exclusively to expiring rvalues / temporaries, enabling resource theft (move semantics).
Architecture Diagram
REFERENCE FORMS & BINDING RULES:
┌──────────────────┬──────────────┬──────────────┬────────────────────────────┐
│ Reference Type │ Binds Lvalue │ Binds Rvalue │ Primary Purpose │
├──────────────────┼──────────────┼──────────────┼────────────────────────────┤
│ T& │ YES │ NO │ In-place mutation / alias │
│ const T& │ YES │ YES │ Read-only zero-copy passing│
│ T&& │ NO │ YES │ Move semantics & ownership │
└──────────────────┴──────────────┴──────────────┴────────────────────────────┘