Quick Q: Implicit conversion and operator overload
▻http://isocpp.org/feeder/?FeederAction=clicked&feed=All+Posts&seed=http%3A%2F%2Fisocpp.org%2Fblog%2F2
Quick A: it tries to convert to int.
Recently on SO:
Implicit conversion and operator overload In comparing the conversions needed by different overloaded functions, a “promotion” is considered a better conversion sequence than a standard “conversion”. Every arithmetic type can promote to at most one other type. (Promotions are also used when passing an argument to a C-style variadic function like printf. The unary + operator can be used to force a promotion of an arithmetic expression, like +n.) For integer types which are not character types or bool, the promoted type is: If int can represent all the values of the original type, then int; Otherwise, if unsigned int can represent all the values of the original type, then unsigned int; Otherwise, the (...)
#News,Articles&_Books,