Liste des Groupes | Revenir à col advocacy |
On Tue, 11 Jun 2024 08:13:31 -0400, Chris Ahlstrom wrote:
>const is used to enforce certain semantics. Of course, it is not>
necessary for a simple C function parameter (e.g. an int) to be const
unless one is pedantic.
I can't cook up a simple example but I've hit instances using functions in
legacy code where one const in a function resulted in having to spread
const around to keep the compiler from whining. It's like the situations
where you use const-cast in C++ to get things to play nice.
Les messages affichés proviennent d'usenet.