Logical const

Sean Kelly sean at invisibleduck.org
Tue Nov 30 11:47:57 PST 2010


Walter Bright Wrote:

> Sean Kelly wrote:
> > Hm... can a const object mutate globals?
> 
> Yes.

That's what I thought.  Having a transitively const object modify a global doesn't seem much different to me than having it modify a non-owned aliased object.  Excepting of course that the compiler can't know which references denote ownership and non-ownership, so the current behavior seems correct from a pragmatic perspective if nothing else.


More information about the Digitalmars-d mailing list