
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 library?
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 libraries.
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. John.