Boost logo

Boost :

Subject: Re: [boost] [thread] Can't use boost/thread/mutex.hpp without boost_system
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2012-01-18 09:09:01


>> >> The Boost.Thread version in trunk does not allow to use simple mutex as it >> was >> possible before: >> >> >>   #include &lt;boost/thread/mutex.hpp&gt; >>   #include <iostream> >> >>   int main() >>   { >>           boost::mutex l; >>           { >>                   boost::unique_lock<boost::mutex> g(l); >>                   std::cout << "Test" << std::endl; >>           } >>   } >> >> >> Was working fine without linking with 1.48 and 1.46 but now >> it fails with current trunk version requiring dependency on Boost.System. >> > >Hi, > >I was not aware that Boost.Thread was working as a header only library. I >have added some support to report errors following the C++11 standard, using >Boost.System. You need to link with Boost.System library. Is this an issue? > Till now I could use Boost.Locale without dependencies on Thread when it was working without ICU. It is not a problem to add a dependency. I just thought if there is a some kind of lightweight mutex that can be used without boost.thread? I can bring something on my own (it is really 20 lines of code) just maybe there is something ready for roll... If not I'll add dependency on system. > > >> It breaks some code and breaks at least Boost.Locale. >> > >Is there some break other than the need to link with? > > No, it there is not other problems. Artyom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk