Boost logo

Boost :

Subject: Re: [boost] Refactoring a library for header-only or linked library?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-04-12 11:10:00


Le 12/04/12 16:14, Paul A. Bristow a écrit :

> Thanks for this advice. Better advice might have been "Don't try this at home!" ;-)
>
> The complexity of templates and their instantiation means that breaking the ODR proves unavoidable.
>
> So I am reverting to the inclusion model :-(
>
> But thanks anyway.
>
Hi,

I agree that a library must be either header-only or not, and that the
user shall no choose. I did this with the intention to move to a
header-only library, but Boost.Systems didn't move, so now Boost.Chrono
is in an unstable situation. I will add a note for the next release
explaining that this is not a configuration option for the end user, but
for the one installing Boost. To be coherent the definition of
BOOST_HEADER_ONLY can not be used at the command line, but the
boost/chrono/config.hpp file must be changed instead to avoid ODR.

Thanks for making me think a little more on this complex design.

Best,
Vicente


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