POV-Ray : Newsgroups : povray.unofficial.patches : Got Boost and VC10 "ambiguous shared_ptr"?...heres why : Got Boost and VC10 "ambiguous shared_ptr"?...heres why Server Time
3 Feb 2023 15:39:25 EST (-0500)
  Got Boost and VC10 "ambiguous shared_ptr"?...heres why  
From: [GDS|Entropy]
Date: 21 Oct 2011 15:35:01
Message: <web.4ea1c956ff55385e77e50e540@news.povray.org>
From microsoft connect:
http://connect.microsoft.com/VisualStudio/feedback/details/522404/share-ptr

Explicitly state: boost::shared_ptr

See below:
----------------------------------------------------------------------------
"Hi,

Thanks for reporting this issue. I've resolved it as By Design, because VC10 has
implemented most of the C++0x Standard Library. C++0x/VC10 provides
std::shared_ptr (and std::make_shared<T>(), etc.) in <memory>. Because the
Standard headers include each other in unspecified ways, including <iostream>
may or may not drag in <memory> and therefore may or may not make
std::shared_ptr visible. When both std::shared_ptr and boost::shared_ptr are
visible, and using-directives for both namespace std and namespace boost are in
scope, you need to explicitly qualify std::shared_ptr or boost::shared_ptr in
order to disambiguate which one you want.

(Error messages talk about std::tr1::shared_ptr because of an implementation
artifact. For backwards compatibility, we currently provide both std::shared_ptr
and std::tr1::shared_ptr. Currently, we actually define shared_ptr in std::tr1
and lift it into namespace std with a using-declaration. Thus, shared_ptr
appears to live in std, but its true name is std::tr1::shared_ptr. In the
future, for increased conformance, we'll reverse this, and in the far future we
might remove tr1 completely.)

Essentially, Boost is a victim of its own success here.

If you have any further questions, feel free to E-mail me at stl### [at] microsoftcom .

Stephan T. Lavavej
Visual C++ Libraries Developer"


Post a reply to this message

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