Boost logo

Boost :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2002-01-30 16:13:06

Peter Dimov wrote:
> From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
> > Why not
> >
> > #include <boost/memory/scoped_ptr.hpp>
> > #include <boost/memory/scoped_array.hpp>
> >
> > etc., or something like this?
> Why not
> boost::memory::shared_ptr<T>?

Because it would be an overkill? :).

> IOW why is it important to keep the boost directory clean but
> this doesn't apply to the boost namespace?

It does, only the criteria for putting something into namespace are (in
general) different from criteria of putting a physical unit that contains
that "something" into a subdirectory; while the empirical rule "namespace
nesting should match directory nesting" is important for keeping logical and
physical structures of code in sync, it's by no means the only rule. There
are satiations when going further in the classification of physical units is
important because it allows you to expose, well, the classification (intent)
without imposing a bureaucratic overhead of such classification on the users
of the "logical side".

> FWIW I find it much more intuitive when class
> N::X is defined in N/X.hpp.

I follow the principle as well, - where it's applicable.


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