On Saturday, 13 October 2012 at 17:01:27 UTC, Tommi wrote:
Another way to describe my reasoning...
According to TDPL, if var is a variable of a user-defined type,
then:
++var
gets rewritten as:
var.opUnary!"++"()
Not always. If user-defined type has an alias this to integer
member, than something different would happen. It would be also
interesting to see, how operation ++T would differ because
somebody imported module with opUnary method. Because opUnary
suits better than alias this, dmd will issue call to that
function, it it see its declaration.