Boost logo

Boost Users :

From: michael mathews (muckjail_at_[hidden])
Date: 2006-11-15 13:12:47


Well I thought it should and I suspect that I am doing something silly
but this is basically the class I have:

template <class N, class V> class test
{
    friend class boost::serialization::access;
    list< boost::serialization::nvp<V> > sl;
    template<class Archive>
    void serialize(Archive & ar, const unsigned int version)
    {
        ar & sl;
        
    }

public:
{
...
}
and it gets caught in the compile trap

template<class T>
    void save_override(T & t, BOOST_PFTO int)
    {
        // If your program fails to compile here, its most likely due
to
        // not specifying an nvp wrapper around the variable to
        // be serialized.
        BOOST_STATIC_ASSERT(0 == sizeof(T));
    }
I thought that a nvp should be serializable automatically.
Ideas?
Thanks in advance
michael
  
--- Robert Ramey <ramey_at_[hidden]> wrote:

> Doesn't it already do this?
>
> Robert Ramey
>
> michael mathews wrote:
> > Hi All,
> >
> > I have a class that contains a list of name value pairs . I would
> like
> > the serialization to use the names for the tag names in the xml
> > archive. Is there a way to do this or do I need to write my own
> custom
> > archive?
> >
> > Thanks in advance
> >
> > Michael
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

 
____________________________________________________________________________________
Sponsored Link

Online degrees - find the right program to advance your career.
Www.nextag.com


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