Transitive const sucks
Walter Bright
newshound1 at digitalmars.com
Wed Sep 12 12:21:38 PDT 2007
Janice Caron wrote:
> But then, I don't understand Walter's objections to "logical
> constness".
>
> Seems pretty simple to me. If a function is logically const but not
> truly const, then don't declare it pure.
>
> Conversely, if it's not declared pure, then it can have logical
> constness.
>
> Isn't that problem solved?
No. Pass a reference to a const through a non-pure function to a pure one.
More information about the Digitalmars-d
mailing list