Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-08-18 07:56:50

Beman Dawes wrote:

> Someone, Valentin I think,


> previously suggested boost sub-namespaces,
> and I reacted negatively.

Thank you for the different reaction: when I propose something,
the answer is a clear no, when someone else proposes it, it's

I know that it's a conspiracy against me.

> But technically, it is the addition of "using namespace
> integer_types;" bringing the sub-namespace names into namespace boost
> which sways me. This gives the users great freedom of choice.
> Including the choice of ignoring the sub-namespace completely; the
> follow still work:
> using namespace boost;
> ...
> int_least8_t myvar;
> using boost::int_least8_t;
> ...
> int_least8_t myvar;
> ...
> boost::int_least8_t myvar;
> That means that we could go back and introduce sub-namespaces to all
> of boost per your proposal without breaking existing code. Always a
> plus.

> What do others think? Ed's proposal makes most sense if applied to
> all boost libraries, so we need a strong consensus before proceeding.

My previous policy was:

namespace ValentinBonnard {
namespace LibraryName {
// library names I use are:
// Utils: utilities
// NumericalTypes: the choosers
// AbstractGraphicalInterfaceLibrary: a GUI library (project)
// MultiThread (project)
// Meta: lists and arithmetic as compile time computations
// STL: STL components (containers, iterators, algorithms)
// Graph: graph manipulation library

namespace FeatureName {
// when using very short names
int i;
typedef char* p;

// normal code

Currently I add:

namespace boost {
    using ValentinBonnard::LibraryName::func_name1;
    using ValentinBonnard::LibraryName::func_name2;
    using ValentinBonnard::LibraryName::class_name;

Valentin Bonnard

Boost list run by bdawes at, gregod at, cpdaniel at, john at