------- Comment #4 from bangerth at dealii dot org  2007-09-24 14:30 -------
My reasoning would be that in the call d%g, the type of the two
expressions are 'double&' and 'A&'. So to call the user-defined
operator%, only the first argument has to be converted to 'A' for which
a conversion constructor is available. On the other hand, to use the
built-in operator%, the first argument has to undergo a floating-integral
conversion, and the second argument a conversion operator call to 'long'.
That's two vs one conversion operation.

That said, this is only my gut feeling, I won't have the time right now
to find out the exact paragraphs, and I don't know my way around in this part
of the standard very well anyway...

W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33409

Reply via email to