compiling error after upgrading from boost 1.33.1 to boost 1.36.0
Hello, I upgraded the boost library in my workstation from boost 1.33.1 to boost 1.36.0. When I compiled my program, I got following errors, /usr/include/boost/detail/sp_counted_impl.hpp:192: error: template argument 3 is invalid /usr/include/boost/detail/sp_counted_impl.hpp:198: error: 'a' has not been declared /usr/include/boost/detail/sp_counted_impl.hpp: In constructor 'boost::detail::sp_counted_impl_pda
::sp_counted_impl_pda(P, D, int)':
/usr/include/boost/detail/sp_counted_impl.hpp:198: error: 'a' was not declared in this scope /usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void boost::detail::sp_counted_impl_pda
::destroy()':
/usr/include/boost/detail/sp_counted_impl.hpp:209: error: expected
nested-name-specifier before 'template'
/usr/include/boost/detail/sp_counted_impl.hpp:209: error: expected
unqualified-id before 'template'
/usr/include/boost/detail/sp_counted_impl.hpp:211: error: 'A2' was not
declared in this scope
/usr/include/boost/detail/sp_counted_impl.hpp:211: error: expected `;'
before 'a2'
/usr/include/boost/detail/sp_counted_impl.hpp:214: error: 'a2' was not
declared in this scope
I'm using gcc 4.1.2.
Below is the file sp_counted_impl.hpp line 181 ~ 221,
template this_type; //This is
the line 192
public:
// pre: d( p ) must not throw
sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a )
{
}
virtual void dispose() // nothrow
{
d_( p_ );
}
virtual void destroy() // nothrow
{
typedef typename A::template rebind< this_type >::other A2;
A2 a2( a_ );
this->~this_type();
a2.deallocate( this, 1 );
}
virtual void * get_deleter( detail::sp_typeinfo const & ti )
{
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast
I upgraded the boost library in my workstation from boost 1.33.1 to boost 1.36.0. When I compiled my program, I got following errors,
**
/usr/include/boost/detail/sp_counted_impl.hpp:192: error: template argument 3 is invalid****
/usr/include/boost/detail/sp_counted_impl.hpp:198: error: 'a' has not been declared****
/usr/include/boost/detail/sp_counted_impl.hpp: In constructor 'boost::detail::sp_counted_impl_pda
::sp_counted_impl_pda(P, D, int)':****
/usr/include/boost/detail/sp_counted_impl.hpp:198: error: 'a' was not declared in this scope****
/usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void boost::detail::sp_counted_impl_pda
::destroy()':****
/usr/include/boost/detail/sp_counted_impl.hpp:209: error: expected nested-name-specifier before 'template'****
/usr/include/boost/detail/sp_counted_impl.hpp:209: error: expected unqualified-id before 'template'****
/usr/include/boost/detail/sp_counted_impl.hpp:211: error: 'A2' was not declared in this scope****
/usr/include/boost/detail/sp_counted_impl.hpp:211: error: expected `;' before 'a2'****
/usr/include/boost/detail/sp_counted_impl.hpp:214: error: 'a2' was not declared in this scope****
** **
I’m using gcc 4.1.2.
What allocator do you pass to shared_ptr?
participants (2)
-
Henson Huang
-
Igor R