I think I have a pretty good idea what it does,
You have proven time and again, by your comments about it, that you have
some very radical misconceptions about what it does. It's not at all
clear what those misconceptions are, only that they've led to reach some
incorrect conclusions. I'm not referring to your judgements of the value
of 'const' - those are inherently subjective. I'm talking about your
(incorrect) statements of fact about the use of 'const'. The most
prominent of those were your suggestion that there was some reason why
use of 'const' would require insertion of numerous (const T*) casts.
Those misconceptions have been pointed out to you, but you've never
responded to those messages in any way that suggests that now understand
what you used to misunderstand. Nor have your responses given us any
reason to believe that your apparent misunderstanding was due to us
incorrectly interpreting what you said, nor to you expressing yourself
poorly.
const is different from any of those because:
(1) Removing it almost as easy as using global replace in a text editor (you
just have to watch out for embedded consts). All those others involve
rewriting code.
That's completely irrelevant to the value provided by 'const'. It
improves error checking - as such, the fact that it can be removed from
error-free code without changing the required behavior is no indication
that it is useless
That 'const' is easy to remove, and has no effect on the required
behavior of correct code, is also true of 'restrict' and 'register'. You
could also, in many cases, remove 'inline' and add 'static' (if it
wasn't already there) without affecting the required behavior of a
program. That doesn't mean that any of those features are useless.
It's arguably the case that 'register' is useless in modern compilers;
the last time I bothered using it was about 30 years ago. However, I
gather that when C first came out it was useful for improving the
results produced by the early compilers. The value provided by
'restrict' is at least as subtle as that of 'const', and I don't expect
you to accept that value any more easily than you accept the value of
'const'. It enables optimizations by declaring undefined behavior that
would otherwise be defined - I'd prefer that it make the corresponding
code a constraint violation, but that wouldn't be feasible in the
general case.
(2) The resulting code will generally be less cluttered and easier to read.
If you feel that way, then I recommend using such a filter when reading
C code; but not when writing or compiling it.