[shared_ptr] gcc 3.2 build broken with current trunk

The shared_ptr (enable_shared_from_this) patch from yesterday breaks our gcc 3.2 builds. Below is a fragment from a Boost.Python unit test (but not requiring Python) and the error produced by gcc 3.2 (Redhat 8.0). gcc 3.2.3 (Redhat Workstation 3) has the same problem. Is there a way to restore compatibility with the old gcc versions? Thanks! Ralf % g++ -c -fno-strict-aliasing -fPIC -I/net/rosie/scratch1/rwgk/hot/boost ~/sp_err.cpp /net/rosie/scratch1/rwgk/hot/boost/boost/shared_ptr.hpp: In function `D* boost::get_deleter(const boost::shared_ptr<Y>&) [with D = boost::detail::sp_deleter_wrapper, T = A]': /net/rosie/scratch1/rwgk/hot/boost/boost/enable_shared_from_this.hpp:97: instantiated from `void boost::enable_shared_from_this<T>::_internal_accept_owner(boost::shared_ptr<Y>&) const [with U = A, T = A]' /net/rosie/scratch1/rwgk/hot/boost/boost/shared_ptr.hpp:100: instantiated from `void boost::detail::sp_enable_shared_from_this(boost::shared_ptr<Y>*, const boost::enable_shared_from_this<T>*) [with T = A, Y = A]' /net/rosie/scratch1/rwgk/hot/boost/boost/shared_ptr.hpp:181: instantiated from `boost::shared_ptr<T>::shared_ptr(Y*) [with Y = A, T = A]' /net/cci/rwgk/sp_err.cpp:22: instantiated from here /net/rosie/scratch1/rwgk/hot/boost/boost/shared_ptr.hpp:666: no matching function for call to `boost::detail::sp_deleter_wrapper::get_deleter()' % cat ~/sp_err.cpp #include <boost/enable_shared_from_this.hpp> #include <boost/shared_ptr.hpp> using namespace boost; class A : public enable_shared_from_this<A> { public: A() : val(0) {}; int val; typedef shared_ptr<A> A_ptr; A_ptr self() { A_ptr self; self = shared_from_this(); return self; } }; class B { public: B() { a = A::A_ptr(new A()); } void set(A::A_ptr _a) { this->a = _a; } A::A_ptr get() { return a; } A::A_ptr a; };

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 21 March 2008 12:57 pm, Ralf W. Grosse-Kunstleve wrote:
The shared_ptr (enable_shared_from_this) patch from yesterday breaks our gcc 3.2 builds. Below is a fragment from a Boost.Python unit test (but not requiring Python) and the error produced by gcc 3.2 (Redhat 8.0). gcc 3.2.3 (Redhat Workstation 3) has the same problem. Is there a way to restore compatibility with the old gcc versions? Thanks!
Does the attached patch fix it? I don't have g++ 3.2 installed. I just tried g++ 3.4.6 and 2.95. 3.4.6 didn't have any problems, but 2.95 did show a similar problem which the attached one-liner resolved. - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH4/7M5vihyNWuA4URAvMWAJwKaMKSHC6DXy66Fld0BSzKyl0LXQCgyooT G7d/jXvmKwxMADd3Y84Iab4= =vDkC -----END PGP SIGNATURE-----
participants (2)
-
Frank Mori Hess
-
Ralf W. Grosse-Kunstleve