Hello,
why is not possible to call this:
-- cut here --
#include
class Trida;
boost::shared_ptr<Trida> trida;
class Trida : public boost::enable_shared_from_this<Trida>
{
public:
Trida()
{
trida = this->shared_from_this();
};
};
int main()
{
boost::shared_ptr<Trida> tr(new Trida());
return 0;
}
-- cut here --
It throws in constructor of shared_count(weak_count const & r).
I think the problem is that there is no one shared_ptr instance that
owns object tr yet when calling constructor.
May be it is BUG (and I don't know how to handle that). Can be at least
note in documentation?
--
Petr "Fers" Ferschmann
-=[ petr@ferschmann.cz ]==[ http://petr.ferschmann.cz/ ]=-
-=[ Koukni na http://www.postcard.cz/ ]==[ +420 604/781 009 ]=-
GPG Fingerprint:
[83B0 6378 7A9D D993 035E 60BD FEEC F665 D2C8 1B9A]
[Non-text portions of this message have been removed]