Boost logo

Boost Users :

From: Scott Meyers (usenet_at_[hidden])
Date: 2006-08-19 01:49:38


Some Boost libraries, such as SmartPtr and Variant, offer a single header with
declarations for all library functionality as well as a set of headers for
subsets of functionality. For example, smart_ptr.hpp declares all of
shared_ptr, shared_array, weak_ptr, scoped_ptr, scoped_array, and intrusive_ptr.
  If I don't want all these declarations, I can use more specific headers, e.g.,
shared_ptr.hpp or scoped_array.hpp. Such libraries allow me to choose between
the convenience of a single comprehensive header or the precision of multiple
targeted headers.

Other libraries seem to offer only the collection of targeted headers. For
example, FileSystem offers five headers, but there doesn't seem to be a
comprehensive filesystem.hpp. Similarly, Lambda seems to offer only targeted
headers; there doesn't seem to be a single "declare everything in Lambda"
header. (There is a lambda.hpp, but it's not comprehensive, e.g., it doesn't
declare Lambda's bind.)

I find that this kind of inconsistency among libraries degrades my experience as
a Boost user, especially when I'm first learning to use a library. More than
once I've spent time puzzling over a compilation error, only to discover that my
mistake was not including a needed header. (I seem to make this error most
commonly when using Lambda.) 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?

Thanks,

Scott


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