bool and int can be used to distinguish between functional overloads. As you would expect, bool arguments will prefer bool overloads and int arguments will int .
Judging by the error message (I assume that the title of your question is part of the error message you received), what you mean is a situation where the argument you provide is neither bool nor int , but the bool and int transformations exist and have the same rank.
For example, consider this
void foo(bool); void foo(int); int main() { foo(0);
The first two calls will be successful and expected. The third call will not be allowed, as the type of the argument is actually unsigned int , which, however, supports implicit conversions for both bool and int , which makes the call ambiguous.
What do you call your functions? Show us the arguments you are trying to convey.
AnT
source share