[Issue 2094] transitive const can be broken easily

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 7 06:40:53 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2094





------- Comment #12 from schveiguy at yahoo.com  2008-10-07 08:40 -------
(In reply to comment #11)
> we expect to get invariant data from invariant object.

Then define an invariant function.  Const is the equalizer, and it's perfectly
acceptable to get invariant data as const.  All const means is that the
function will not modify the data, and will not return anything but const
references to the data.  It doesn't mean that if the data is invariant, the
function magically returns invariant.

I don't see how this bug is valid.


-- 



More information about the Digitalmars-d-bugs mailing list