From: John Maddock (john_at_[hidden])
Date: 2004-07-28 05:16:14
> Most of boost is implemented in header files (as most is based on
> templates). However, what are the guidelines for splitting code into
> compilable units?
> For example, if a library is not a template library, should the author
> strive to implement it entirely in headers as inline functions, or
> should it be implemented as part inline functions and part a compiled
> A fair amount of code uses the PIMPL pattern to reduce header
> complexity, reduce interface and implementation exposure, and to reduce
> compile times. However, this requires, in large part, separate compiled
> What is the Boost position in this regard?
Do what works best for the particular library: for example the filesystem
lib uses separate source in order to hide platform dependencies, and that's
a good thing. On the other hand we normally try not to gratuitously provide
separate source if it could all be implemented as trivial inlines. There is
also some guidance at http://www.boost.org/more/separate_compilation.html.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk