boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
201 stars 161 forks source link

boost/thread/detail/thread.hpp #includes boost/bind.hpp unconditionally but uses it conditionally #307

Open dmenendez-gruposantander opened 4 years ago

dmenendez-gruposantander commented 4 years ago

I can see boost::bind() used only if BOOST_THREAD_PROVIDES_VARIADIC_THREAD is not defined

Could the #include <boost/bind.hpp> be moved inside a #ifndef BOOST_THREAD_PROVIDES_VARIADIC_THREAD section? In fact I'd move it inside an #else section under line 50

Boost.Bind brings in a lot of cruft, that is, increased compile times and funny warnings boost/bind/placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled

Happy to provide a PR