From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-04-02 13:11:56
> Alexander Nasonov wrote:
>> IIRC, someone asked recently why asio requires -lboost_system at link time.
>> In my personal opinion, C++ wrappers for OS services should not be header-only.
>> I would prefer asio, process, shmem and the like to be all consistent with
>> boost.filesystem. Opinions?
> I think they should, if practical, have an option to be used as header only.
> Implementations should be put in .ipp files and controlled by a macro like:
> If you don't add this macro then you have to link the library -- otherwise
> it's header only. I realize it's a bit more work for the library developers,
> but that way we can have it both ways. I see this as like having an 'all
> inclusive' header for a library even though there are more granular headers --
> it makes it easy to get started and it actually handles the majority of the
> cases where people don't care about optimizing 'include performance'.
Although the discussion is slipping away from the original question, I
must say I 100% agree with Jeff. The best solution is to give user a
choice whether to link or to go header-only (where possible). And in
my opinion such solution should be unified for all boost libs.
We already have the BOOST_USE_WINDOWS_H macro, why not extend it to
something like BOOST_USE_OS_NATIVE_HEADERS? I think this would settle
the problem once and for all. The only problem is I'm not sure how
such a transition should be organized.
-- Best regards, Andrey mailto:andysem_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk