M
Marcel Müller
Hi,
I have the problem that two types have smart pointers that point on each
other. The smart pointers are similar to boost::intrisive_ptr and
boost::scoped_ptr, but not identical, because the the platform is too
old for the boost libraries to compile. Unfortunately my implementations
requires T to be a complete type.
The boost documentation says the T need not to be a complete type unless
you instantiate the smart pointer. How did they do the trick? I found no
hint in the boost documentation.
class B;
class A
{
scoped_ptr<B> b;
//...
};
class B
{
intrusive_ptr<A> a;
//...
};
Is there a solution for the above dependency other than turning b into
an ordinary pointer and emulating the smart pointer in the functions of A?
I have the problem that two types have smart pointers that point on each
other. The smart pointers are similar to boost::intrisive_ptr and
boost::scoped_ptr, but not identical, because the the platform is too
old for the boost libraries to compile. Unfortunately my implementations
requires T to be a complete type.
The boost documentation says the T need not to be a complete type unless
you instantiate the smart pointer. How did they do the trick? I found no
hint in the boost documentation.
class B;
class A
{
scoped_ptr<B> b;
//...
};
class B
{
intrusive_ptr<A> a;
//...
};
Is there a solution for the above dependency other than turning b into
an ordinary pointer and emulating the smart pointer in the functions of A?