12.4 — Lvalue references to const
In the previous lesson (), we discussed how an lvalue reference can only bind to a modifiable lvalue. This means the following is illegal: int main() { const int x { 5 }; // x is a non-modifiable (const) lvalue int& ref { x }; // error: ref can not …