#include <iostream> #include <vector> #include <string> auto f(std::vector<auto> a) { a.push_back('0'); return std::string(""); } int main() { std::vector<char> v; f(v); return 0; }
Standard input is empty
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(""); ^
Standard output is empty