Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2007-10-24 10:57:41


Peter Dimov wrote:
> Markus Schöpflin wrote:
>
>> Sigh, obviously I don't manage to create a small reproducer for the
>> error seen at http://preview.tinyurl.com/23towf. (Scroll down to the
>> last five errors, ignore the rest, this has been fixed by now.)
>
> Can you please try changing
>
> intrusive_ptr_add_ref( detail::get_pointer( m_ptr ) );
>
> to
>
> T * p = detail::get_pointer( m_ptr );
> intrusive_ptr_add_ref( p );
>
> ?
>
> It could be the intermediate get_pointer call that is tricking the compiler
> into thinking that the call is not dependent.

I modified the constructor into:

    intrusive_ptr(const pointer &p, bool add_ref = true): m_ptr(p)
    {
       if(m_ptr != 0 && add_ref)
       {
         T* p = detail::get_pointer(m_ptr);
         intrusive_ptr_add_ref(p);
       }
    }

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);
--------^

Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk