Generally, one does not know if the sharing info is currently shared and should therefore be const. Better keep it const almost all the time and only remove the constness when absolutely necessary and the code has checked that it is valid.
Generally, one does not know if the sharing info is currently shared and should therefore be const. Better keep it const almost all the time and only remove the constness when absolutely necessary and the code has checked that it is valid.