How is 'if (x)' where 'x' is an instance of a class, not an implicit conversion?

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… Read More How is 'if (x)' where 'x' is an instance of a class, not an implicit conversion?