O'Reilly logo
  • Yuan Peng Chiang thinks this is interesting:

conversion operator

From

Cover of Sams Teach Yourself C++ in 24 Hours, fifth edition

Note

//implicit conversion
operator int() const { return 7; }

// explicit conversion
explicit operator int*() const { return nullptr; }