Boost logo

Boost :

Subject: Re: [boost] [thread] Can't use boost/thread/mutex.hpp without boost_system
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-01-22 18:03:17

Le 22/01/12 23:01, Beman Dawes a écrit :
> On Sun, Jan 22, 2012 at 8:29 AM, Mathias Gaunard
> <mathias.gaunard_at_[hidden]> wrote:
>> On 01/22/2012 12:00 PM, Vicente J. Botet Escriba wrote:
>>> I recognize that it could be difficult for libraries as Boost.Thread or
>>> Boost.FileSystem, but I don't think Boost.System will be on this case as
>>> its dependency are really minor, isn't it?
>>> Could you explain more deeply the problem you want to avoid?
>> error_code.cpp includes windows.h and puts lots of symbol in the global
>> namespace.
> Right. Including windows.h is a non-starter in a header.
> error_code.cpp also makes extensive use of the unnamed namespace.
> That's also something that isn't normally permissible in a header.
>> I'm not sure #include "local_free_on_destruction.hpp" works either in a
>> scenario where the file is included.
> Good question. I'm not sure either.
>> So there are problems with the approach of including .cpp files as-is, and a
>> better approach must be found.
> Exactly!
I agree. Please, can you take a look at this thread
I proposed in it a patch to make Boost.System header-only, and I gues it
avoid all these concerns.


Boost list run by bdawes at, gregod at, cpdaniel at, john at