error: static assertion failed: std::thread arguments must be invocable after conversion to rvalues
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.