On Wednesday 27 November 2002 2:52 pm, Lars Gullik Bjønnes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > | On Wed, Nov 27, 2002 at 01:59:45PM +0000, Angus Leeming wrote: > >> This is inconsistent, would't compile on my box and will have Lars > >> jumping up and down crying "don't pass const int". For reasons I've yet > >> to fathom. > | > | And actually I doubt Lars will jump as it adds modern cruft ("const" is > | not even fifteen years old after all...) to the code ;-) > > const on pod types in signatures have no meaning. so better to leave > them out.
Of course they have meaning. Not to the outside world, but internal to the function. Semantically, these are identical both to the outside world and within the function. func(int const var) { ... } func(int const & var) { ... } whilst this is identical to the above only to the outside world. func(int var) { ... } This argument may not be in standardese, but who cares. The effect it describes is real. Angus