Topic: class conversions
Author: steve@taumet.com (Steve Clamage)
Date: Fri, 18 Jun 1993 21:25:43 GMT Raw View
simonh@swidev.demon.co.uk (Simon Huntington) writes:
>What are the rules for using class-conversions and class-operators in
>expressions?
>From what I've seen, class-operators are used in preference to using class-
>conversions and then the standard built-in operators.
No, there is no such explicit rule, although a given set of
functions and function calls could certainly exhibit this behavior.
A user-defined conversion may be invoked explicitly (as via a cast)
or implicitly to perform parameter matching on a function call.
A user-defined operator, class member or not, is just an overloaded
function. The rules for selecting an overloaded function apply. You
can read about them in all their gory detail in the ARM, chapter 13.
--
Steve Clamage, TauMetric Corp, steve@taumet.com
Author: simonh@swidev.demon.co.uk (Simon Huntington)
Date: 17 Jun 93 13:16:06 GMT Raw View
What are the rules for using class-conversions and class-operators in
expressions?