What do these errors mean
23:43 11 Sep 2026

I am learning thread to build an NPC movement and when I ran the thread it gave me an error but I have no idea that it means can someone help me. I've been all over youtube, reddit and stackover flow trying to solve this

I basically have a thread and I put a function in with the parameters


std::thread t1(sheep_mvmt, sheep1, sheep_counter, rand_state, dt);
t1.join();
 error: attempt to use a deleted function
  198 |   std::__invoke(std::move(std::get<1>(__t)), std::move(std::get<_Indices>(__t))...);
      |   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__thread/thread.h:207:8: note: in instantiation of function template specialization 'std::__thread_execute, void (*)(SHEEP &, int &, STATE &, float), SHEEP *, int *, STATE *, float *, 2UL, 3UL, 4UL, 5UL>' requested here
  207 |   std::__thread_execute(*__p.get(), _Index());
      |        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__thread/thread.h:217:50: note: in instantiation of function template specialization 'std::__thread_proxy, void (*)(SHEEP &, int &, STATE &, float), SHEEP *, int *, STATE *, float *>>' requested here
  217 |   int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get());
      |                                                  ^
sheeps.cpp:108:15: note: in instantiation of function template specialization 'std::thread::thread' requested here
  108 |                 std::thread t1(sheep_mvmt, &sheep1, &sheep_counter, &rand_state, &dt);
      |                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/nat.h:25:3: note: '~__nat' has been explicitly marked deleted here
   25 |   ~__nat()                       = delete;
      |   ^
c++ multithreading raylib