According to cppreference.com an explicit conversion function cannot be used for implicit conversions. As an example they have this:
struct B
{
explicit B(int) { }
explicit B(int, int) { }
explicit operator bool() const { return true; }
};
int main()
{
...
if (b2) ; // OK: B::operator bool()
...
}
I would have thought that 'if (b2)' was an implicit conversion and therefore not able to use the explicit conversion function. So what would be an example of an implicit conversion that wouldn't be allowed?