Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference to 'shared_ptr' is ambiguous #8

Closed
ryandesign opened this issue Nov 24, 2013 · 4 comments
Closed

reference to 'shared_ptr' is ambiguous #8

ryandesign opened this issue Nov 24, 2013 · 4 comments
Labels
bug reported or triaged as proper bug, i.e. not working as designed, and affecting all platforms

Comments

@ryandesign
Copy link

Building povray 3.7.0.0 on OS X 10.9 has the following trouble:

In file included from backend/bounding/bbox.cpp:43:
In file included from ./backend/frame.h:58:
In file included from ./backend/control/messagefactory.h:39:
./backend/control/renderbackend.h:112:16: error: reference to 'shared_ptr' is ambiguous
  map<SceneId, shared_ptr<Scene> > scenes;
               ^
../vfe/unix/syspovconfig.h:85:14: note: candidate found by name lookup is 'shared_ptr'
using boost::shared_ptr;
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:3756:56: note: candidate found by name lookup is 'std::__1::shared_ptr'
class __attribute__ ((__type_visibility__("default"))) shared_ptr
                                                       ^

In MacPorts we are replacing all occurrences of shared_ptr with boost::shared_ptr to work around this.

@c-lipka
Copy link
Member

c-lipka commented Nov 24, 2013

Why on earth does your compiler do this, despite the boost type being explicitly pulled in by the "using" directive?

Maybe explicitly telling the compiler to not use C++11 might help.

@mistydemeo
Copy link

This is specifically happening using clang's libc++ standard library, which is the default under OS X 10.9. Not sure it can be made to not use C++11.

@c-lipka
Copy link
Member

c-lipka commented Nov 24, 2013

It might be worth trying boost::tr1 for the smart pointers; according to the docs it should simply pull in std::tr1 if available, but boost's implementation otherwise.

c-lipka added a commit that referenced this issue Dec 16, 2013
…tion otherwise; we're using <boost/tr1/memory.hpp> to pull in either. Should fix GitHub issue #8.

corresponds to Perforce change 6132.
@c-lipka
Copy link
Member

c-lipka commented Dec 16, 2013

should be fixed in master now.

@c-lipka c-lipka closed this as completed Dec 16, 2013
zholos added a commit to zholos/freebsd-ports that referenced this issue Jul 22, 2014
Upstream has fix for {boost,std::tr1}::shared_ptr ambiguity, but now
there's {std::tr1,std}::shared_ptr ambiguity.

See:
POV-Ray/povray#8
POV-Ray/povray#31
LeForgeron referenced this issue in LeForgeron/povray Jun 29, 2015
…tion otherwise; we're using <boost/tr1/memory.hpp> to pull in either. Should fix GitHub issue #8.

corresponds to Perforce change 6132.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug reported or triaged as proper bug, i.e. not working as designed, and affecting all platforms
Projects
None yet
Development

No branches or pull requests

3 participants