
"Peter Dimov"
Anthony Williams:
If not so, what's the reason for boost::detail::lightweight_mutex to exist ?
I think it's a historic artifact from versions of boost.thread prior to 1.35.0 when boost::mutex required linking to the thread library, which allowed mutexes to be used in header-only boost libraries.
True. "lightweight" was an unfortunate name; it's only lightweight in that it doesn't require a library build step. It's in the detail:: namespace, so this should be enough of a hint that it's only an implementation detail of other Boost libraries and is not meant to be used directly.
I'll leave it to Peter to comment on whether he thinks it's still required and why.
I just tried a simple #include
under MSVC, and I got (a) included and (b) an autolink reference to libboost_thread (which surprised me; it used to "only" autolink to libboost_datetime).
The windows.h include comes from boost.datetime. Hopefully it'll go soon. The auto-link against libboost_thread is surprising to me, but I rarely use just boost mutexes in an app. I'll investigate. Hopefully Jeff will figure out a way to selectively autolink libboost_datetime too, as it's not really required for the thread stuff. Anthony -- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL