Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-07-17 12:55:57


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:: ...

Robert Ramey

>
> Vicente
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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