Passing the parameters by reference to the std::thread object probably will result in a crash for most users, if they don't take care that those parameters have to be valid and constant for the whole thread lifetime.
Instead of capturing the parameters with a lambda expression it would be probably better to pass the parameters as a thread local copy, e.g. by passing the function parameters as parameters to the thread instance.
Passing the parameters by reference to the std::thread object probably will result in a crash for most users, if they don't take care that those parameters have to be valid and constant for the whole thread lifetime.
https://github.com/CloudPolis/webdav-client-cpp/blob/5a92c825e84ba0a3d1907b8cbdaeee7fa3079bb5/sources/client.cpp#L556
Instead of capturing the parameters with a lambda expression it would be probably better to pass the parameters as a thread local copy, e.g. by passing the function parameters as parameters to the thread instance.