On Tuesday, 28 December 2021 at 14:48:24 UTC, Era Scarecrow wrote:

Probably better to make data private vs making it const. I tend to use const far more as input arguments to help denote it won't change references and less for elements in a struct. That or make it a class? I'm not sure.

It's a matter of consistency - if a function returns something in const one should be able to store it without any type modification.

Reply via email to