const/invariant bug?

Extrawurst spam at extrawurst.org
Thu Apr 3 08:09:39 PDT 2008


Walter Bright schrieb:
> Craig Black wrote:
>>  void setX(int nx) const { x = nx; }
>
> That should work, but at the moment:
>
> const void setX(int nx) { x = nx; }
>
> does work.

Why do we need the suffix "const" anyway ? Isnt unambiguity a virtue ?



More information about the Digitalmars-d mailing list