Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-11-14 12:29:12


Robert,
I think I've a bug to report. I'm trying to serialize class which is defined
like:

     class BlockFormula : public std::map<int, int> {
     public:
            int i;
            template<class Archive>
            void serialize(Archive& ar, unsigned)
            {
                ar & i;
            }
        };

and I get the ambiguity between serializitaion for this class, and for
std::map. I attach the example and the output from compiler. I realize it's
not the most common case and in fact I'm not happy with derivation from
std::map, but I still think serialization lib should not force me to refactor
code.

And one more nit:

template<class Archive, class Key, class Compare, class Allocator >
inline void serialize(
    Archive & ar,
    std::map<Key, Compare, Allocator> &t,

I think std::map has four parameters: Key, Value, Compare and Allocator.

- Volodya





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk