The relationship of invariants and alias this

angel via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 11 00:18:35 PST 2014


Wait !
"x.value -= 100;" would call the invariant ?
Alias this only rewrites your expression:
"x -= 100;" becomes "x.value -= 100;"
No method is called. Then there is no reason (is there ?) to call 
the invariant.
If you would create getter/setter properties ...


More information about the Digitalmars-d mailing list