2015-07-14 18:32 GMT+03:00 Robert Ramey <ramey@rrsd.com>:
On 7/14/15 6:57 AM, Rodrigo Madera wrote:
On Mon, Jul 13, 2015 at 3:07 PM, Lee Clagett <forum@leeclagett.com
<mailto:forum@leeclagett.com>> wrote:

    My other question was about the header-only design. Is there a
    reason why all of the code is being exported into the users
    codebase? Is it necessary? I think this should be a compiled +
    linked library, or it should be explained in the rationale.


I've been thinking about this... The cost of having the library
header-only in this case is symbol pollution, bringing lots of otherwise
encapsulated information.

Maybe non-header-only solution would be "cleaner" from a user's point of
view?

This is a recurring issue with boost libraries.  Header only makes for a convenient library for many users - just include the header and try it out.  On the other hand, for a large project where one is willing to invest more effort, a compiled library is attractive.  I believe that for many libraries, it's possible to make the library such that one could have both by  providing different #include for each type.  This comment applies not to just this library but to others as well.  Of course it wouldn't apply to all libraries.  I would love to seem someone invest some effort to see if this is possible for this or some other library.  Then if such an experiment were successful, we'd write up an article about it and include it in the boost body of work.

This could be useful. I'll think of adding a BOOST_DLL_USE_LIBRARY macro and compiling DLL as a library

--
Best regards,
Antony Polukhin