|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-02-19 01:10:42
"Douglas Paul Gregor" <gregod_at_[hidden]> wrote in message
news:20040218133129.U23746_at_eggbeater.cs.rpi.edu...
> On Wed, 18 Feb 2004, Pavol Droba wrote:
> > If there would be just one boost::algorithm and everything inside it,
than aliasing
> > would work just fine. But imagine having
> >
> > namespace algo=boost::algorithm;
> > namespace sa=boost::algorithm::string;
> > namespace ca=boost::algorithm::container;
> >
> > It is easy to get lost in such a lot of namespace. One would have to
look into the docs
> > to see which algoritm lies in which namespace. It could realy be
painful.
I must admit that I haven't used quilified names that much since I prefer a
using namespace XXX in my .cpp files.
However, when overloaded versions cannot co-exist (because of ambiguity), I
kind of like the idea of aliasing.
I think with names like
namespace str = boost::algorithm::string;
namespace cont = boost::algorithm::container;
One can always find the name that seems reasonable readable while still
reasonable short.
> I think the subnamespaces are a bad idea. I suggest that
>
> #include <boost/algorithm/string.hpp>
> - Includes all string algorithms, in namespace boost::algorithm
>
> #include <boost/algorithm/container.hpp>
> - Includes all container algorithms, in namespace boost::algorithm
>
> #include <boost/algorithm.hpp>
> - Includes all boost/algorithm/* and imports them all into namespace
> "boost" with using declarations.
If it would work, I would like it. But I suspect that enable_if coding would
be
necessary to disambiguate overloaded functions.
br
Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk