|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-08-19 11:26:19
Jeff Garland wrote:
>> Is there some kind of Boost convention or policy
>> on whether a library should offer a comprehensive "declare
>> everything in the library" header in addition to more targeted
>> headers?
Personally, I avoid the "comprehensive" headers. I personally
feel uncomfortable with the idea if including unused stuff
as a side effect. This is especially true now that this
extra stuff may include templates.
This is one reason that the serialization library has no such
"comprehensive" header defined. The other reason is that
it's not clear how much such a header might include - all
possible archives? all stl serialization. etc. Finally, at
least in the serialization library, the mere inclusion of
a header can result in the instantiation of code which
is never called - thereby adding to code bloat.
So, I think the issue would be best addressed by discouraging
the creation and usage of "comprehensive" headers. Of
course, for me that is not a big issue as I avoid their usage
in any case.
Now, that does raise the issue that sometimes a compilation
error arise for the lack of a specific header and that the
error message is non-obvious. I'm not sure, but
perhaps this can be alleviated by more/better usage
of concept checking in library headers.
> There are header and directory policies:
>
> http://www.boost.org/more/header.htm
LOL - amazing that I had never seen this before. I think
this needs a little updating. It seems to me that
the creation of something like
#include <boost/furball/fur.hpp>
would be preferred to
#include <boost/furball.hpp>
unless boost/furball.hpp is merely a "comprehensive" library.
I suppose this is how the guidlines should be enhanced.
Robert Ramey
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net