Extended Type Design.

Tyler Knott tywebmail at mailcity.com
Thu Mar 22 19:46:40 PDT 2007


Bruno Medeiros wrote:
> Well, yes, but is 'invariant' transitive like const? I think it is (but 
> I'm not sure, I'm getting a bit lost in the thread), and if it is, those 
> semantics won't work. I.e., "typeof(&foo) " in my example can't be 
> invariant anything.
> 

D'oh, of course!  It's legal to modify data referenced by foo, which makes it incompatible with invariant pointers, but 
which is fine for const pointers.  I think const pointer is the correct answer for typeof(&foo).



More information about the Digitalmars-d mailing list