Boost logo

Boost :

From: mda_at_[hidden]
Date: 2001-09-24 17:20:50

i'm having a hard time making any sense of what boost's
policy is supposed to be for boost developers (developers,
not users) for nesting namespaces within boost,
for using subdirectories, for use of the "boost/detail"
directory, etc. -- and how those policies might be related.

some conflicting examples:

- boost/function.hpp puts some symbols
in namespace boost::detail::function, yet places the
private header files in boost/function/

- boost/random.hpp includes several headers from boost/random/,
yet those place symbols in namespace boost, not boost::random.
there is also a boost/random/detail/ directory; it places
symbols in boost::random (but not boost::random::detail or

- boost/rational.hpp is self-contained; within it there is a
namespace detail block (don't know why it isn't an anonymous

- boost/call_traits.hpp includes boost/detail/call_traits.hpp
which puts symbols into both boost and boost::detail

- boost/math/quaternion.hpp contains symbols in boost::math
(this one makes sense to me).

and those are just some samples. it is easier to find differences
than similarities.

i imagine some people don't see this as a problem.
it probably doesn't bother boost users who will just examine
the top-level directory. but it does bother at least some people
(me for example :)) who want to get an understanding of the structure
by perusing the source tree.

some sample guidelines might be:
- if a file is defining symbols in namespace boost::foo:baz
it should be in directory boost/foo/baz/
- vice-versa, code in a directory boost/foo/baz/ should be defining
symbols in namespace boost::foo::baz
- an exception is that the "src" subdirectory may be used for
.cpp files implementing headers in its parent directory.
- the "detail" subdirectory is not an exception to these rules.
- an exception is that at top-level (only) a file boost/foo.hpp
may include files from directory boost/foo/, and those included
files may define symbols in namespace boost, not just namespace
- for purposes of these rules, class names are not reflected
in the directory hierarchy, and symbols such as in class
boost::myclass such as boost::myclass::mytypedef are still
defined in file boost/myclass.hpp.


there are other things that bother me here too (that "pending"
directory which IMHO should be a peer to boost, not a subdirectory,
the occasional practice of using files by the same name in different
directories, etc.) but i'll stop for now.


Boost list run by bdawes at, gregod at, cpdaniel at, john at