I have an array (actually a std::valarray) of integers. They represent a solution, thus they change throughout the algorithm. However, the 1st (array[0]) is a special case, which should never be changed. I'm enforcing this with several checks, but chances are that at some point I'll forget or mess up a check and stuff will break.
Thus, my question is: is there an easy way to enforce a const-ness on a single element of an array?