Boost logo

Boost :

Subject: Re: [boost] boost and vendor's TR1 implementations
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2008-11-12 12:40:55


David Abrahams wrote:
> on Wed Nov 12 2008, Sergey Sadovnikov <flex_ferrum-AT-artberg.ru> wrote:
>
>
>> By the way when C++0x will be committed and std::tr1 namespace will be merged
>> with std namespace a lot of code will become uncompilable because of
>> both std and boost namespaces exposed into global or local scope.
>>
>
> "Doctor, it hurts when I do this..."
>
> Sorry to be glib, but I really can't get too worked up over this.
> This is why we have namespaces. If you erase the namespace boundaries,
> collisions happen. Should anyone be surprised that names in Boost, a
> library collection specifically aimed at standardization, eventually
> match some of those in std::?
>
>
And anyway, you don't get problems unless you're actually using one of
the types that are now ambiguous. That is, you don't get an error just
because you have using namespace boost and using namespace std in the
same file. You only get an error if you then attempt to use shared_ptr
without qualification.

Which is still a problem that probably affects quite a bit of code, but
much less.

Sebastian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk