|
Boost : |
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-07-17 12:09:37
---------------------------
Vicente Juan Botet Escriba
----- Original Message -----
From: "Robert Ramey" <ramey_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, July 17, 2008 6:55 PM
Subject: Re: [boost] [1.36.0] Libraries with unmerged changes?
>
> vicente.botet wrote:
>
>>>> However,
>>>> I would probably consider this a user error in that it violates
>>>> the intention of name spaces to avoid just this problem.
>>
>> Hi,
>>
>> Is there a way the user can write their code to avoid this possible
>> ambiguity?
>> Is there a way the developper can add a new interface avoiding this
>> possible ambiguity on the user code?
>> How the C++ standard library does to avoid this kind of ambiguity in
>> user code?
>
> This is easy, just don't put any of your own stuff into the the namespace
> that the library uses.
>
>> Does this banish the use of using in user code if he/she wants to
>> avoid incompatibilities with newer releases?
>
> If you never put any of your own stuff in to the boost:: or std::
> namespaces, you shouldn't have this problem.
>
> If you use "using <namespace>" you could still have aproblem
> if one of your names accidently matches something this the
> namespace being used. For this reason, I don't particularly
> like using "using <namespace>" myself but rather just
> spell out the whole thing like boost::filesystem:: ...
>
Here the user do not put any on into the std namespace.
using namespace std;
struct shared_ptr {};
My question was, How the new C++0x standard library avoid regression on the
user code when the user migrates to C++0x ?
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk