fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <cctype>
  5. #include <cstdlib>
  6. #include <stdexcept>
  7. #include <initializer_list>
  8.  
  9. using namespace std;
  10.  
  11. constexpr size_t sz() { return 42; }
  12. constexpr size_t scale (size_t i) { return i * sz(); }
  13.  
  14. bool f (const string &s1, const string &s2) { cout << "function called" << endl; return 0; }
  15. bool g (const string &s1, const string &s2);
  16.  
  17. int main()
  18. {
  19. int i = 2;
  20. int a[scale(i)];
  21.  
  22. string x = "xxx", y = "yyy";
  23. decltype(g) *pf = f;
  24. (*pf)(x, y);
  25. }
  26.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
function called