Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 1999-12-18 06:52:06


All -

>We can't do that. '_Detail' is reserved. <

Yes you're all right, _Detail is reserved, it looks as though I should have
suggested _detail, which is reserved in global and std namespace but not
inside user-defined namespaces - that would prevent there ever being a
_detail namespace at the top level which could get confused with
boost::_detail.

>The detail
namespace should only ever be referenced by boost code, and so the
reference will always come from within the "namespace boost {}"
scoping, so even if there is a "detail" namespace at global scope, the
boost::detail namespace will be unambiguously chosen over it.<

Agreed, however the situation I envisioned was one where there was a class
of the same name in ::detail and ::boost::detail - the user doesn't know
about boost::detail - he/she wants the one in ::detail, but because he's
added a "using namespace boost" declaration, both namespaces are in fact
visible to him.

>I just want to point out that we already have a problem because of one of
those innocuous-seeming implementation namespaces. For those of us who
prefer to eschew using-directives, it is highly cumbersome to use the casts
in boost::cast. We have to write out both qualifiers, despite attempts to
avoid this by bringing cast into boost with nmespace composition (due to
special lookup rules for templates).<

I was thinking that it's best for documented code to really be in boost (as
you say so that lookup rules really work) - only undocumented support code
should go in boost::_whatever.

- John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk