I have C ++ code that uses shared_ptr and STL heavily. General heading says
#include<boost/shared_ptr.hpp> using boost::shared_ptr; // for shared_ptr using namespace std; // for STL
Now I wanted to switch to C ++ 0x to use language functions using gcc 4.6 with -std=c++0x . However, there is also std::shared_ptr , which leads to ambiguity for the undefined shared_ptr ( boost::shared_ptr vs std::shared_ptr ).
When switching to std::shared_ptr instead:
#include<memory> using namespace std; // for STL; also imports std::shared_ptr
then I have problems with boost::python , which only works with boost::shared_ptr (at least without further messing around):
/usr/include/boost/python/object/make_ptr_instance.hpp:30:52: error: no matching function for call to 'get_pointer(const std::shared_ptr<Cell>&)'
Therefore my question
- if there is a simple solution to eliminate the ambiguity between
boost::shared_ptr and std::shared_ptr (other than using C ++ 0x), and also - if
boost::shared_ptr will ultimately be just an alias for std::shared_ptr ; which will automatically solve my problem.
Thanks!
eudoxos
source share