<Can I use a friend function defined within a clas...
# community-feeds
r
Can I use a friend function defined within a class as my thread function? I'm new to C++ and trying to understand concepts in threads. My reading material surrounding this question is "Anthony Williams - C++ Concurrency in Action" - Listing 3.6. I have written the listing by myself, but can't seems to get the code to work. I believe the problem I'm facing is calling an in-class friend function as the thread function. I have referred to Interaction between c++11 std::thread and class friend function as...