Oh ok, now I feel dumb. :(
I thought that because it was a template, I couldn't forward declare
it because the template would need information about the class.
I might still have some issues when I start inlining, but I should be
able to work around them.
Jared
On Tue, Mar 31, 2009 at 9:12 AM, Peter Dimov
Jared Lee Richardson: ...
I have the following situation, simplified down.
Header file 1:
class Test1 { vector<Test2Ptr> mTest2Objects; };
typedef boost::shared_ptr<Test1> Test1Ptr;
Header file 2:
class Test2 { vector<Test1Ptr> mTest1Objects; };
typedef boost::shared_ptr<Test2> Test2Ptr;
Now normally I'd get around this easily by doing a forward declaration, but I can't do that with a smart pointer definition.
Why not? With raw pointers you'd do:
class Test2;
class Test1 { vector
mTest2Objects; }; With shared_ptr you do
class Test2;
class Test1 { vector< shared_ptr<Test2> > mTest2Objects; };
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users