
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Mathias Gaunard Sent: Sunday, January 16, 2011 11:18 AM To: boost@lists.boost.org 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 like you shouldn't do "using namespace std"...
+1 - it will come round and bite you eventually (or some poor unsuspecting maintainer). And Boost's many examples should NOT set a bad example by doing "using namespace boost". IMO "using boost::a_library::a_function;" is actually much better, despite being longer, because it makes clear where the function comes from. Authors NB! Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com