fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. struct bar
  5. {
  6. bar(const std::string &s) : bar_str(s)
  7. {
  8. printf("constructor\n");
  9. };
  10.  
  11. std::string bar_str;
  12. };
  13.  
  14. int main()
  15. {
  16. bar{"testing"};
  17. return 0;
  18. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
constructor