3 ms·
Well, they are actually trying to extract some meaning from it for optimization purposes, so I wouldn't call it 'ignored'. 'inline' would be a better example o
by jjuhl 11y ago
Well, they are actually trying to extract some meaning from it for optimization purposes, so I wouldn't call it 'ignored'.
'inline' would be a better example of another "ignored" keyword.
- ambrop7 11y agoWhat useful meaning is there for optimization purpuses? As far as I know, there is no meaning in pointer-to-const other than it must not be used directly to modify the stored value (if it is you get a compile error). It is always valid from the perspective of language semantics to cast-away the const and modify the pointed-to object, as long as the object is not itself read-only. So, to my knowledge, they could not make any additional assumptions based on pointer-to-const, though they could use it as a hint to look for a possible optimization.
- jjuhl 11y agoDid you read the link? It's all explained there.