void handler1(std::string& s) {}void thread1(std::function<void(std::string&)>& f) {}auto f = std::bind(handler1, _1);
std::thread t(&thread1, std::ref(f)); //<-- Ошибка :(std::function<void(std::string&)> f = std::bind(handler1, _1);
//или тупо
std::function<void(std::string&)> f = handler1;