fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4.  
  5. auto f(std::vector<auto> a)
  6. {
  7. a.push_back('0');
  8. return std::string("");
  9. }
  10.  
  11. int main() {
  12.  
  13. std::vector<char> v;
  14.  
  15. f(v);
  16.  
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 3452KB
stdin
Standard input is empty
compilation info
prog.cpp: In instantiation of 'auto f(std::vector<auto:1>) [with auto:1 = char]':
prog.cpp:15:5:   required from here
prog.cpp:8:23: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'char' in return
  return std::string("");
                       ^
stdout
Standard output is empty