fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename T>
  5. struct Test
  6. {
  7. T t;
  8. Test(const T &t_) : t(t_) {}
  9. };
  10.  
  11. Test<int> foo()
  12. {
  13. return 3;
  14. }
  15.  
  16.  
  17. int main() {
  18.  
  19. auto res = foo();
  20. cout<<"foo returns "<<res.t<<"\n";
  21. return 0;
  22. }
Success #stdin #stdout 0s 4544KB
stdin
Standard input is empty
stdout
foo returns 3