Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-02-04 09:40:37


----- Original Message -----
From: "Dave Abrahams" <abrahams_at_[hidden]>
>
> I have no problem with namespace nesting, but please do not try to do
> namespace composition with using-directives. On a conforming compiler,
they
> do not work as expected. In particular, template name lookup will not
> proceed through a using-directive. Individual using-declarations must be
> used instead, as we did for boost/cast.hpp

I was not aware of that side effect of using-directives. Considering then
that only using declarations should be used, I'm not so sure that nesting
stdint is a good idea. The problem is that the set of names that are
defined is platform dependant and known only to stdint.h. To have the
cstdint.hpp know which names to pull in, we would lose the nice separation
between the "pure C" style stdint.h and the simple C++ wrapper cstdint.hpp.

Probably the best way around the problem is for stdint.h to define a bunch
of macros and have cstdint.hpp use those macros to decide what pull into
boost::stdint. This is one of those tradeoff situations where the library
must be uglier for the user code to get prettier. I think we all agree that
the quality of the user code is paramount when there is such a tradeoff. In
this case though, since the advantage to the user code is admittedly small,
maybe it's not worth it.

My two cents is that the benefit to the user code is enough that it is worth
implementing the nested namespace in boost, despite the headache, although
my opinion is not strong on this issue. Opinions?


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