fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4.  
  5. struct type {
  6.  
  7. operator std::string() const {
  8. return "type";
  9. }
  10. };
  11.  
  12. std::string f() {
  13. type t;
  14. return t;
  15. }
  16.  
  17.  
  18. int main() {
  19. std::cout << f() << std::endl;
  20. }
  21.  
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
type