In file included from prog.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/thread:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/functional:1365:56: error: no type named 'type' in 'std::result_of<void (*(std::vector<int, std::allocator<int> >))(std::vector<int, std::allocator<int> > &)>'
typedef typename result_of<_Callable(_Args...)>::type result_type;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/thread:138:8: note: in instantiation of template class 'std::_Bind_simple<void (*(std::vector<int, std::allocator<int> >))(std::vector<int, std::allocator<int> > &)>' requested here
std::__bind_simple(std::forward<_Callable>(__f),
^
prog.cpp:12:9: note: in instantiation of function template specialization 'std::thread::thread<void (&)(std::vector<int, std::allocator<int> > &), std::vector<int, std::allocator<int> > &>' requested here
thread t(fun, v);
^
In file included from prog.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/thread:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/functional:1385:50: error: no type named 'type' in 'std::result_of<void (*(std::vector<int, std::allocator<int> >))(std::vector<int, std::allocator<int> > &)>'
typename result_of<_Callable(_Args...)>::type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
2 errors generated.