but the site changed. So I created a new account with this mail adress.
...
I'm misunderstanding something and you want to provide both a const and a pseudoconst method on the same class, in which case, please elucidate why that would ever be useful, because I truly cannot think of an example.
"
Pseudo Const can be useful in this example :
"
Your are a university director and want to know the best ten students (the "top"). To do this you may sort all the results, and keep the ten best, but this causes tons of useless comparisons. The solution for me is a pseudo const
function member :a loop of 10 iterations : "find the best result, remove if from the results", and reinsert the top ten student in the container.
As student result shall not be erased, the pseudo constness of the member function guaranties no result were erased