Re: 100% Portable Atomic Reference Counted Pointer...



On Feb 11, 4:10 pm, Hallvard B Furuseth <h.b.furus...@xxxxxxxxxxx>
wrote:

const on function arguments is pointless, though I suppose it
can help readability on large functions.

Const is pointless in function declarations, it doesn't affect
declaration. But it's not pointless in function declarations. This
won't compile:

void f(int const x)
{
x = 0;
}

Dmitriy V'jukov
.



Relevant Pages

  • Re: List<> of struct with property. Cannot change value of property. why?
    ... I was under the impression that we were discussing the "const" keyword as it applies to function declarations. ... Second, in the above example, the second line of code doesn't compile. ... In other words, any difference between the two lines of code you posted are caused *not* by the use of the "const" keyword, but rather by the differences in the way the compiler deals with a pointer versus an array. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: CString help
    ... it's pointless to talk about its (non-existent) consequences. ... The technique writes to &s ... But data is const value_type *dataconst; ...
    (microsoft.public.vc.mfc)
  • Re: [OT] quick question about function declarations in C++
    ... I don't seem to recall at the moment so I thought of trying you all ... omit the variable names altogether in the function declarations. ... double sum(const double& p, const double& q) { ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)