Should I prefer private member functions, or functions in an unnamed namespace? [duplicate]

In the semi large projects where I usually work (more than 2 million lines of code) I would ban private class functions if I could. The reason being that a private class function is private but yet it’s visible in the header file. This means if I change the signature (or the comment) in anyway …

Read more

Should you use const in function parameters, and why does it not affect the function signature?

const is pointless when the argument is passed by value since you will not be modifying the caller’s object. Wrong. It’s about self-documenting your code and your assumptions. If your code has many people working on it and your functions are non-trivial then you should mark const any and everything that you can. When writing …

Read more