Conversion operator example List::operator bool() const { return head; } int main() { List l; if (l) cout << "List has stuff" << endl; else cout << "List is empty" << endl; }