Boost logo

Boost Users :

Subject: Re: [Boost-users] [shared_ptr] Error in Constructor
From: David A. Greene (greened_at_[hidden])
Date: 2010-05-21 22:23:58


On Friday 21 May 2010 20:54:25 David A. Greene wrote:

> What's the rationale for the enable_if'd constructor? Is
> BOOST_SP_NO_SP_CONVERTIBLE an official part of the
> library? Apparently it is causing gcc to check all doSomething
> members of Action against shared_ptr<Wrapper<B> >
> and those checks are causing instantiations of Wrapper<A>.

Urk. I just found out. The attached test does not compile with
BOOST_SP_NO_SP_CONVERTIBLE because it renders shared_ptr
unable to construct pointer-to-base from pointer-to-derived.

Ugh. How does one satisfy the requirements of both of these tests?
The first test has the requirement that types tracked by shared_ptr
need not be defined in some translation units. The second has the
requirement that shared_ptr be able to construct a pointer-to-base from
a pointer-to-derived.

                                 -Dave




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