in reply to Re: overloading '0+'
in thread overloading '0+'

and then the assignment is the other.

No. Assignments don't trigger 0+, and the result of the call to int is not an object, so overload doesn't apply to the assignment. I verified this by removing the assignment.

Replies are listed 'Best First'.
Re^3: overloading '0+'
by bruceb3 (Pilgrim) on Sep 03, 2007 at 05:12 UTC
    Your right. My bad. How about this for an explanation;

    The argument to int is evaluated in numeric context, which calls truncate. Then when there isn't an overload for int, 0+ is used, which calls truncate again ???