Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread][win32, msvc] Mutexes
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-29 08:39:59


Anthony Williams:
> 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.

If being header-only and not including <windows.h> are design goals for
boost::mutex, the library should include tests for them. <windows.h> is
easy:

#include <boost/thread/mutex.hpp>
int Sleep;

The header-only-ness could be more difficult; it's hard to test that a
library is not being linked.

It might also be possible to refactor Boost.Threads to not include any
Date/Time headers on its own (but still interoperate with it).


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net