I have a (member-) fuction overloaded as follows:
bool foo(bool);
int foo(int);
float foo(float);
...
std::string foo( std::string const&);
for several built-in types, but not for const char*. The call foo("beauty is only skin-deep");, to my great surprise, is called the bool variant of the foo function. This leads to my questions:
QUESTION: Is there a well-defined implicit conversion order for built-in types
NO QUESTION: How to avoid implicit conversion. How evil is an implicit transformation ....
EDIT: remove the implicit conversion question for custom questions
source
share