
5 Nov
2008
5 Nov
'08
4:37 p.m.
Igor R wrote:
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
Nothing unusual about that: you have two different shared_ptr's visible in scope: boost::shared_ptr and std::tr1::shared_ptr. You need to decide which you intend to use and either prefix all shared_ptr usages with the appropriate qualifiers, or else just take care to only import the one shared_ptr in the first place. HTH, John.