Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-11-12 16:57:34


From: "Jens Maurer" <Jens.Maurer_at_[hidden]>
> With that change, boost no longer provides ::int8_t etc. as part of
> its interface.

Can we have the types put into a subnamespace so that they can be accessed
without qualification after a statement such as:
using namespace boost::int_types;

At one time boost used a pattern like this:
namespace boost {
  namespace int_types {
     typedef char int8_t;
  }
  using namespace int_types;
}

However, I believe that this was found to break something, although I don't
know what. (Anyone care to elaborate?)

Assuming there is a problem with the above pattern, how about something like
the following:

namespace boost {
  typedef char int8_t;
  namespace int_types {
    using int8_t;
  }
}

I believe that providing a mechanism for pulling in a set of names that is
technically unbounded, but heavily constrained by classification is good
tradeoff between total conflict safety and ease of use. These types are a
good example of the type of names that can be a real pain to have to use
qualified or to individually qualify with using declarations. In this case
it would be worthwhile to consider the experience of existing languages for
which pulling in unbounded sets of names constrained to a given conceptual
area work in practice. Ada, Java, and C# (and probably others that are
beyond my knowledge (Python?)) strongly support namespaces and
directive-style qualification. Does anyone have experience with how such
usage is working out in practice?


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