Boost logo

Boost Users :

Subject: [Boost-users] Encountering an issue trying to compile on OS X 10.11.4
From: Brian Krisler (bkrisler_at_[hidden])
Date: 2016-03-29 10:29:51


Hi,

I am trying to compile a package that utilizes boost libraries, and the compilation fails. This is on OS X El Capitan, with clang version: 7.3.0.7030029. Is this a known issue, and is there a work around?

In file included from /opt/local/include/boost/signals2/slot_base.hpp:18:
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:42:54: error: reference to 'weak_ptr' is ambiguous
    template<typename T> struct weak_ptr_traits<std::weak_ptr<T> >
                                                ~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:5035:29: note: candidate found by name lookup is 'std::__1::weak_ptr'
class _LIBCPP_TYPE_VIS_ONLY weak_ptr
                            ^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:25:30: note: candidate found by name lookup is 'std::weak_ptr'
  template<typename T> class weak_ptr;
                             ^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:42:33: error: redefinition of 'weak_ptr_traits<weak_ptr<type-parameter-0-0> >'
    template<typename T> struct weak_ptr_traits<std::weak_ptr<T> >
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:38:33: note: previous definition is here
    template<typename T> struct weak_ptr_traits<boost::weak_ptr<T> >
                                ^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:54:56: error: reference to 'shared_ptr' is ambiguous
    template<typename T> struct shared_ptr_traits<std::shared_ptr<T> >
                                                  ~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3847:29: note: candidate found by name lookup is 'std::__1::shared_ptr'
class _LIBCPP_TYPE_VIS_ONLY shared_ptr
                            ^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:24:30: note: candidate found by name lookup is 'std::shared_ptr'
  template<typename T> class shared_ptr;
                             ^
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:54:33: error: redefinition of 'shared_ptr_traits<shared_ptr<type-parameter-0-0> >'
    template<typename T> struct shared_ptr_traits<std::shared_ptr<T> >
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/signals2/detail/foreign_ptr.hpp:50:33: note: previous definition is here
    template<typename T> struct shared_ptr_traits<boost::shared_ptr<T> >
                                ^
4 errors generated.

Thanks

Brian


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