Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-01-29 11:58:52


try the following

template<class T>
bool serialize_with_boost_to_socket(T const * const _obj, StreamSocket*
send_socket){

    std::strstream ss;
    {
        boost::archive::text_oarchive oa(ss);
        /ERROR/ oa << _obj;
        }

    char* _serialized_data=ss.rdbuf()->str();
    size_t _serialized_data_size = ss.rdbuf()->pcount();
    ......

    return true;
};

mauro gargano wrote:
> Hi everybody,
>
> I'm having deep troubles with the serialization library. I need to
> serialize a class (called VisualisationObject3D),
> but every time I try to serialize it I get a static compile error
> boost::STATIC_ASSERTION_FAILURE<x> referring to the line: oa << _obj
> (below you find the error stack and the source code).
>
>
> Since the error has to do with the tracking I tried disabling the
> trackin also, but without success.
>
>
> CAN SOMEBODY HELP ME?
>
>
> ]


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