Boost logo

Boost :

Subject: Re: [boost] [system][chrono] header-only libs
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-10-14 11:31:34

----- Original Message -----
From: "Beman Dawes" <bdawes_at_[hidden]>
To: "boost" <boost_at_[hidden]>
Cc: "Ion Gaztañaga" <igaztanaga_at_[hidden]>
Sent: Thursday, October 14, 2010 5:14 PM
Subject: Re: [boost] [system][chrono] header-only libs

2010/10/12 vicente.botet <vicente.botet_at_[hidden]>:
> Hi,
> after discussion with Ion about whether Boost.Interprocess could use Boost.Chrono and Boost.System he has found as major drawback that both are not header-only libs. I have implemented Boost.Chrono as a header only lib.
> If the user wants Boost.Chrono be a header-only lib s/he needs to define the BOOST_CHRONO_INLINED macro. While this could be useful, there is a problem as Boost.Chrono depends on Boost.System that is not a header-only lib.
> Beman do you mind if I try to make your library configurable as header-only, so Ion could use Boost.System and Boost.Chrono and preserve Boost.Interprocess as a header-only lib?

Having a header only option for Boost.System would be a nice addition,
so it would be great if you could give it a try in the sandbox.

My main concern is the inclusion of <windows.h>. While I see less
harm in including <WinError.h>, I don't want to include any of the
more problematic Windows headers, let alone <windows.h>.

My initial reaction to Anthony's
<boost/thread/win32/thread_primitives.hpp> is quite positive. I've
also just provided the declarations for Win32 functions in some of my
code, but thread_primitives.hpp does it in a more elegant way.


I will try to manage with the inclusion of <windows.h> as proposed by Anthony, following the way is done in <boost/thread/win32/thread_primitives.hpp>.

Ion, it seems that we could have Boost.System and Boost.Chrono (if accepted) as header-only libs in a near future :)


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