Subject: Re: [boost] namespace boost?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-01-16 07:07:54
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of Mathias Gaunard
> Sent: Sunday, January 16, 2011 11:18 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] namespace boost?
> On 15/01/2011 19:58, Robert Ramey wrote:
> > Certain names like join, zip, map, copy, etc. ... apear in multiple
> > libraries. I would like to use "using namespace boost" but then I'm
> > afraid that using something like copy will be ambigiuos
> boost::copy is a range-based version of std::copy.
> It's not ambiguous because it doesn't have the same arity.
> Anyway, it's probably not a good idea to do "using namespace boost", just
> you shouldn't do "using namespace std"...
+1 - it will come round and bite you eventually (or some poor unsuspecting
And Boost's many examples should NOT set a bad example by doing "using
IMO "using boost::a_library::a_function;" is actually much better, despite
being longer, because it makes clear where the function comes from.
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk