Fully transitive const is not necessary

Walter Bright newshound1 at digitalmars.com
Thu Apr 3 02:57:34 PDT 2008


Janice Caron wrote:
> ...which raises an interesting point. Can "synchronized" be used on a
> const object? What about an invariant object?

"No" for an invariant object, because there is no point to locking 
something that is invariant. Since an invariant can be implicitly cast 
to const, that means it can't be allowed for const, either.



More information about the Digitalmars-d mailing list