Fully transitive const is not necessary

Janice Caron caron800 at googlemail.com
Thu Apr 3 07:51:10 PDT 2008


On 03/04/2008, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
>  > Can you give me a counterexample of a logically const (muty) class in
>  > which the non-mutable subset is actually useful?
>
> Certainly:
> <snip>

In the example you just gave me, the non-mutable subset consisted of
the empty set - i.e. no members whatsoever. I don't call that useful.

Given that, the function pure f could just have easily have been taken
outside the class altogether and been a standalone function.

Do you want to try again?



More information about the Digitalmars-d mailing list