Boost Users :
Subject: [Boost-users] shared_ptr and Visual Studio 2008 Express SP1
From: Sergey Sadovnikov (flex_ferrum_at_[hidden])
Date: 2008-11-05 09:30:25
During migrating my project under new development environment I face
out following issue: ambiguous unqualified 'shared_ptr' name resolution.
For example in .cpp files I using several usings such as:
using namespace std;
using namespace std::tr1;
using namespace boost;
In source code I have something like this:
shared_ptr<SomeType> var = /*...*/;
And for each such line I have an error:
error C2872: 'shared_ptr' : ambiguous symbol
could be 'c:\program files\microsoft visual studio 9.0\vc\include\memory(1392) : std::tr1::shared_ptr'
or 'c:\program files\microsoft visual studio 9.0\vc\include\memory(1392) : std::tr1::shared_ptr'
or 'p:\projects\common\boost_1.36.0\boost\shared_ptr.hpp(165) : boost::shared_ptr'
What I have to do to avoid this errors for boost 1.36 except explicit
Explicit including of "boost/shared_ptr" or "memory" I already put into
#ifdef/#endif braces. But this didn't help.
-- Best Regards, Sergey mailto:flex_ferrum_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net