fork download
  1. #include <iostream>
  2.  
  3. struct C
  4. {
  5. C() { std::cout << "ctor\n"; }
  6. };
  7.  
  8. void f()
  9. {
  10. static C c;
  11. }
  12.  
  13. int main() {
  14.  
  15. std::cout << "main\n";
  16.  
  17. f();
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
main
ctor