
Markus Schöpflin wrote:
But I still get:
cxx: Error: ../../../boost/interprocess/smart_ptr/intrusive_ptr.hpp, line 77: identifier "intrusive_ptr_add_ref" is undefined (undeclared) detected during instantiation of "boost::interprocess::intrusive_ptr<T, VoidPointer>::intrusive_ptr(const boost::interprocess::intrusive_ptr<T, VoidPointer>::pointer &, bool) [with T=n_transitive::X, VoidPointer=VP]" at line 468 of "intrusive_ptr_test.cpp" intrusive_ptr_add_ref(p); --------^
This is a point of instantiation error. It's caused by intrusive_ptr_add_ref not being defined in one of the associated namespaces of n_transitive::X. Looking at the test, it looks like namespace N, the home of N::base, is the appropriate place for standard-conforming compilers. In http://svn.boost.org/trac/boost/browser/trunk/libs/smart_ptr/test/intrusive_... I've defined intrusive_ptr_* as inline friends of base, but an out of class definition in N will also work.