"Integration of the Standard Template Library and the Microsoft Foundation Class" - читать интересную книгу автора (Wolfgang Paul, Song Yang)
2.4.4.1 CArchive_output_iterator
Adapting the output_iterator to become the CArchive_output_iterator is very straightforward. Merely replace ostream with CArchive. The result is as follows:
template ‹class T›
class CArchive_output_iterator: public std::iterator‹std::output_iterator_ tag, void, void› {