Boost logo

Boost Users :

Subject: Re: [Boost-users] XML Serialization: Putting Stylesheet tag insideXMLfile
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-02-19 11:34:42


girish hilage wrote:
> Hi,
>
> I am able to insert the stylesheet tag from inside a constructor
> of my new derived class.
> Please find below the whole program.
>
> But, I am still getting an error :
> terminate called after throwing an instance of 'std::bad_cast'
> what(): std::bad_cast
> Aborted (core dumped)
>
> on the statement :
> xa << BOOST_SERIALIZATION_NVP(e);
> in the code below.
>
> The statements :
> xa.putTag ("TESTING_XMLCLASS");
> xa << BOOST_SERIALIZATION_NVP(tmp);
> oa << BOOST_SERIALIZATION_NVP(e);
> work as expected.
>
> Can you please let me know what could be the reason for this?
>

I can't. The only thing that looks missing to me is:

#include <boost/serialization/string.hpp>

Robert Ramey


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