https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92472
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to David Binderman from comment #10) > > It certainly has an effect on which member functions you can call on the > > parameter. > > Agreed, but does it matter ? These are a bunch of comparison > functions, they AFAIK shouldn't be changing the objects they are comparing. You're confused. It's irrelevant whether the comparison function changes anything, and that's not what cppcheck was complaining about anyway. It was talking about the parameters to operator< and you didn't change that in your patch. My comment was saying that *if* you had change what cppcheck was complaining about, it would have been wrong for a different reason (that you can't call operator* if the parameters are const). > I am still not sure if the new code is ok or not, Wasn't "This is 400% wrong" clear? > Suggest play safe and assume that JW is correct, so the proposed change to > file > multiway_merge.h should be removed. It already has been. > If this code is to die, should it be marked as unmaintained ? What does that mean?