Using Serial as boolean function argument The following program compiles in the Arduino IDE.

void doSomething(bool) {}

void setup() {      
  doSomething(Serial);
}

void loop() {}


But, as expected, this one doesn't:

class MyClass {};

void doSomething(bool) {}

void setup() {   
  MyClass myClass;
  doSomething(myClass);
}

void loop() {}


The compiler returns the error cannot convert 'MyClass' to 'bool' for argument '1' to 'void doSomething(bool)'



Why is it possible to compile the former? Isn't Serial a normal class instance (of HardwareSerial)? Does it makes any sense to interpret Serial as a bool?
HardwareSerial defines operator bool(), which allows it to be used in a boolean context.