Boost logo

Boost Users :

Subject: Re: [Boost-users] privately inherit enable_shared_from_this?
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-12-11 13:13:24


2009/12/11 Eric J. Holtman <eric_at_[hidden]>

> class Request : private boost::enable_shared_from_this<Request> {
> public:
> boost::shared_ptr<Request> get_ptr () {
> if (conditions_are_good)
> return shared_from this ();
> else
> throw std::logic_error ("Bad get");
> };
> };

Try declaring boost::enable_shared_from_this<Request> a friend of Request.

Roman Perepelitsa.



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