Always make references const?

Should references always be const? I am currently in school for CEG and was wondering if this is an industry standard. I have sometimes found it helpful to not have a const reference so that it allows me to change variables when they go to another function. Is this bad coding practice?

Nevermind I see they are called “outparameters” just had to keep going in the lectures.

See here
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-conventional

3 Likes

Privacy & Terms