Graham Percival <gra...@percival-music.ca> writes: > On Thu, Sep 06, 2012 at 07:20:57PM +0000, benko....@gmail.com wrote: >> Description: >> remove top-level const's from declarations > > Could you elaborate on why we want this? Do the consts fail to > compile with some compiler, or are they only supposed to be > included in the C++ files, or...?
They are not part of the function signature. It does not matter if they differ between function declaration and function implementation. In the actual implementation, they tell the compiler that the variable assigned with the parameter value is not supposed to be changed. Since that variable is not accessible after the function completes, this kind of implementation detail is nonsensical to place in a header file, and since it is not part of the function signature, the compiler does not check for consistency. It is just empty noise. Note that it is noise for "top-level" const, like char * const x, but not for things like char const *x where the const does not concern the parameter itself but rather the data you can access _through_ it. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel