Sign in to follow this  
Chris81

boost::serialize with stl vectors of polymorphic non-boost smart pointers

Recommended Posts

That was a mouthfull. Anyhow, are any of you using the setup in the subject? [edit] problem was mentioned prematurely and solved on my own, however I am still interested to see who uses this setup... [/edit] Thanks! [Edited by - Chris81 on July 1, 2005 11:01:50 PM]

Share this post


Link to post
Share on other sites
Actually, I just noticed that this stack trace isn't even dealing with the stl vectors yet. This is still Pointer<Mesh> which has vectors inside of it.

So the problem only involves the use of the non-boost:shared_ptr smart pointer.

Share this post


Link to post
Share on other sites
Stupid question, and posted way too soon. I really need to work on that patience thing...

Anyhow, I forgot about having to implement RTTI to use boost::seralize. Problem solved.

Share this post


Link to post
Share on other sites
I just wanted to add to this thread, now that I have used it a little bit, that boost::serialization rocks! It works like a charm, pointers and all!

However, since I'm relatively new to C++ I almost feel like I'm missing out by not having to code all that stuff by hand. Obviously I wouldn't code something as sophisticated as boosts implementation, however I would learn a lot by doing my own scaled down serialization.

This raises the age old debate - reinvent the wheel for learning purposes, or use the existing wheels and invent the car?

This seems especially prevelant for a new C++ coder using all the features of boost.

Like, can you invent the car when you don't know how the wheels accomplish their task? I know you can, as long as you know how it's supposed to work. For example there are a lot of programmers out there using VB who have no idea about finite state machines, adders, flip-flops, memory registers, and the thousands of other technologies that make the computer work. However he may be able to create a very useful and sophisticated application.

However, at what point does this end...okay, my brain is twisting into a knot...no more philosophical talk for me, time for bed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this