On Wednesday, 6 November 2013 at 17:10:34 UTC, Ali Çehreli wrote:

I would be very surprised if unary "-" produced a different type from the operand:

Ali

Operator does not produce type, it produces value of expression, and type of expression happens not to be the type you expected. But such expectations need not correspond to language rules (try to think from from language laywer perspective). In bearophile case, I guess Typedef!double overloads unary operator which returns double which is primary reason for such behavior.

Reply via email to