The intention of that doc was that methods should not be marked const - that is implicit in the fact that they are immutable types, and it is better to be consistent about it than not.
I’ve seen one place this came up as a problem: in generic code you can get things that passes you a const reference to a pair<Type, thing>
, which makes its element types const, which means you can’t access the members. You have to extract the element out to a temporary, which seems silly.
API consistency is important to me. If we care about solving this, I think we should flop completely the other way and mandate const everywhere. I don’t think we should be in a split situation.
-Chris