POV-Ray : Newsgroups : povray.beta-test : Beta 37 and C++0x : Beta 37 and C++0x Server Time
30 Jun 2024 17:21:08 EDT (-0400)
  Beta 37 and C++0x  
From: Fredrik Eriksson
Date: 29 May 2010 14:06:40
Message: <op.vdha87gp7bxctx@toad.bredbandsbolaget.se>
I just tried to compile beta 37 with Visual C++ 2010. I got it working  
eventually, but there is at least one major problem that needs to be  
fixed. The code uses 'shared_ptr' without a namespace qualifier, and  
instead imports the entire 'boost' namespace. However, because the code  
also imports the entire 'std' namespace there is a conflict between the  
'shared_ptr' from Boost and the one in the standard library (one of the  
C++0x features in VC2010). Fully qualifying each and every reference to  
'shared_ptr' (thank you, "Replace in files") of course fixes this  
particular problem.

Linux users may run into the same problem if/when they upgrade to a newer  
version of libstdc++. A similar conflict can be expected for  
'boost::thread' as well.

Why does the POV-Ray code blindly import whole namespaces anyway? There is  
a reason why 'using namespace' statements are considered poor practice.



-- 
  Fredrik Eriksson
  fe7### [at] yahoocom


Post a reply to this message

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