I am trying to add a std::function to std::thread and i stumble upon this error Why is this not working? Answer The initial integer value is missing when thread ctor is called: thread(std::ref(tfunc), 123). Function of thread body takes integer, you need to provide it when thread starts.