POV-Ray : Newsgroups : povray.beta-test : Beta 37 and C++0x : Re: Beta 37 and C++0x Server Time
4 Jul 2024 18:12:10 EDT (-0400)
  Re: Beta 37 and C++0x  
From: Fredrik Eriksson
Date: 30 May 2010 17:21:48
Message: <op.vdjeylms7bxctx@toad.bredbandsbolaget.se>
On Sun, 30 May 2010 22:39:26 +0200, clipka <ano### [at] anonymousorg> wrote:
>
> I think a reasonable way to achieve this would be to drop the "using  
> namespace boost;" and replace it with either explicit namespace  
> prefixes, or - which I'd personally favor - individual "using  
> boost::whatever" statements to pull only the identifiers into global  
> namespace that are actually used.

Unfortunately, doing the latter is not enough. You can/will still get  
collisions as long as you continue to use "using namespace std;". At the  
very least, you would need to adopt the same practice for entities in the  
'std' namespace as well.

The point of namespaces is to prevent name collisions in code that uses  
several libraries (in this specific case, Boost and the standard library).  
Importing whole namespaces destroys that benefit, particularly when done  
at namespace scope.



> Fact is, as of today, the POV-Ray code /can/ be changed to be perfectly  
> compatible with all of (a) the current C++ standard, (b) Microsoft's  
> VC++ 2010 implementation and (c) whatever the future C++ standard may be  
> - so I'd say this trouble report would be a good occasion to just go  
> ahead and make it so.

One problem with just going ahead and making it so is that such a change  
may encounter resistance, as evidenced by this very thread.



-- 
FE


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.