Boost logo

Boost :

From: George M. Garner Jr. (gmgarner_at_[hidden])
Date: 2005-04-12 07:51:13


A comment in interface_oarchive.hpp states that
interface_oarchive<Archive>::This() is supposed to return the a pointer to
the most derived class. Actually, it gives you a pointer to the "Archive"
template parameter which may or may not be the most derived class, depending
on how your internal "invoke" plumbing resolves the type. In the following
case I was able to get the most derived class only by overriding both
operator<<(const T & t) and save_override()(using VC2k3):

class fau_xml_woarchive :
public boost::archive::xml_woarchive
    template<class T>
    void save_override(const ::boost::serialization::nvp<T> & t, int i)
        boost::archive::save(*this, t.value());
    template<class T>
    _Mytype& operator<<(const T & t)
        save_override(t, 0);
        return *this;

Was that your intention?



Boost list run by bdawes at, gregod at, cpdaniel at, john at