
I think you should look into xml_?archive to see how std::string is serialized and work from that. Robert Ramey Robert Bielik wrote:
Robert Ramey skrev:
Or maybe you >> operator isn't checking for the tag> so it doesn't know when to stop.?
I'm definitely not looking for the tag> in the >> operator. Is it guaranteed that the character sequence is not to be found in the value itself (i.e. it is escaped)?
In the case of the xml archive I'd rather have some other kind of operator that passes the value itself, not leaving the >> operator of each class to have to check for the character sequence, something like:
template<class char_type> void operator () (const char_type* start, const char_type* end) { }
I don't think making the item "primitive" is the way to go here.
which hides the archive implementation, and only passes on the correct value when loading the archive. For saving, the << operator is just fine.
/R