News for hackers. Stuff that matters.
Re:Const all the things? by gpderetta on Monday January 24, 2022 @09:31AM (#30058006)
To stay on topic, if x was declared const, you wouldn't have to guess. The compiler would tell you.
Re:Const all the things? by lelanthran on Monday January 24, 2022 @11:50AM (#30060204)
> To stay on topic, if x was declared const, you wouldn't have to guess. The compiler would tell you.

Frequently it can't be declared constant, because it is being changed in that scope as it runs.

Re:Const all the things? by tsimionescu on Monday January 24, 2022 @04:46PM (#30064516)
This was a discussion about passing out (or inout) parameters as `T&` vs `T*`. By definition, these parameters can't be const, so const is irrelevant to this thread.
Re:Const all the things? by gpderetta on Sunday January 30, 2022 @09:46AM (#30137610)
Good point.