From: David Abrahams (dave_at_[hidden])
Date: 2005-08-18 11:53:40
Rob Stewart <stewart_at_[hidden]> writes:
> From: David Abrahams <dave_at_[hidden]>
>> Rob Stewart <stewart_at_[hidden]> writes:
>> What libraries are doing that? The authors might need a dope-slap. I
>> hope it's not one of mine! ;-)
> This isn't exhaustive, but here are a few examples that I found
> (I tried to skip related matches):
I can't speak for all of these, but some of them are libraries that
don't have their own namespace (e.g. enable_if). As long as enable_if
is directly in namespace boost, it makes sense that its detail is in
boost::detail. Whether or not enable_if should be in a subnamespace
is a different fight. The same applies to
iterator/counting_iterator.hpp, for example.
The ones in detail/ are mostly components that were deemed to be of
general utility within Boost but whose authors were not ready to give
them a "public face" (i.e. review, documentation). They do not
officially "belong" to any specific library and are often used across
several libraries. Having them in boost::detail makes sense.
> The following are examples in which another namespace is created
> inside boost::detail rather than a detail namespace within the
> library namespace. This keeps the names separate, but still
> seems inverted.
Yep, that's a little weird. I can say from experience that in a
subnamespace of boost it can be awkward to have both
boost::subnamespace::detail and boost::detail in scope, so it is
sometime better to use another name (like aux:: a la MPL).
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk