What is the difference between...

Bruno Medeiros brunodomedeiros+spam at com.gmail
Fri Sep 7 12:13:52 PDT 2007


Daniel Keep wrote:
> 
> 
> 4. "const(T)" (type constructor) -- turns any reference type T into a
> read-only view of the referenced data; has no effect on non-reference types.
> 
> 5. "invariant(T)" (type constructor) -- turns any reference type T into
> a *globally immutable* view of the referenced data.  This means that not
> only can't you make changes, no one else can, either.  Has no effect on
> non-reference types.
> 

That's not quite the case, see my previous post.

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list