|
Boost : |
From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-02-03 23:30:17
on 2/3/00 11:11 AM, Ed Brey at brey_at_[hidden] wrote:
> I'd like to suggest that we put the cstdint definitions into a nested
> namespace, so that this subset can be pulled into a given context all at
> once. The boost namespace would also pull all the names in, as per standard
> boost practice with this kind of namespace nesting.
>
> Specifically, cstdint, would look like:
>
> namespace boost {
> namespace stdint {
> #include <boost/stdint.h>
> } // namespace stdint
> using namespace stdint;
> } // namespace boost
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
(CodeWarrior is the only compiler I know of which is conforming in this
regard. Most others will let you get away with the using-declaration)
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk