Overload resolution happens in several different situations
Class c(value)
), the candidates are constructors of Class
.Class c = value
) and for finding the user defined conversion function to invoke in a user defined conversion sequence. The candidates are the constructors of Class
and if the source is a class object, its conversion operator functions.Nonclass c = classObject
). The candidates are the conversion operator functions of the initializer object.R &r = classObject
), when the class has conversion operator functions that yield values that can be bound directly to r
. The candidates are such conversion operator functions.Class c{1, 2, 3}
), the candidates are the initializer list constructors for a first pass through overload resolution. If this doesn't find a viable candidate, a second pass through overload resolution is done, with the constructors of Class
as candidates.