fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int afunc()
  5. {
  6. cout << __FUNCTION__ << endl;
  7. return 1;
  8. }
  9.  
  10. void test()
  11. {
  12. static const int the = afunc();
  13. cout << the << endl;
  14. }
  15.  
  16. int main() {
  17. cout << "before test" << endl;
  18. test();
  19. return 0;
  20. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
before test
afunc
1