The following conversion is required to invoke bool
overload:
const char[6] ---> const char* ---> bool
The following conversion is required to call the std::string
overload:
const char[6] ---> const char* ---> std::string
This is due to a custom conversion (using the std::string
conversion constructor). Any sequence of transformations without a custom transform is preferred in sequence with a custom transform.
When comparing the main forms of implicit conversion sequences (as defined in 13.3.3.1):
- a standard conversion sequence (13.3.3.1.1) is a better conversion sequence than a user-defined conversion sequence or an ellipsis conversion sequence, and
- [...]
A standard conversion sequence includes only standard conversions. A user transformation sequence is a single user transformation.
source share