
This also failed to compile for me with VC 7.1. However it did compile with gcc 3.3, borland 6.64 and comeau. So its safe to say its a compiler problem. In your case you might just make all the member public. Robert Ramey Robert S. Grimes wrote:
Argh! Now if only I can remember the attachments! They are the text (broken) and binary (works) versions. My broken text code in question is presented, in part, below. The compiler complains about the second friend line.
-- Code -- #include <iostream> #include <ostream> #include
#include ; friend class boost::archive::basic_text_oprimitivestd::ostream; friend class boost::archive::save_access; #endif
template<class Archive> class rsg_text_oarchive_impl : // don't derive from text_oarchive !!! public boost::archive::text_oarchive_impl<Archive> { typedef rsg_text_oarchive_impl derived_t; #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: #else friend class boost::archive::basic_text_oarchive
boost::archive::basic_text_oarchive<Archive>::init(); } } }; -- end Code - more follows here... -----Original Message----- Subject: [serialization] Problem deriving from text_oarchive_impl
Hi,
I'm starting to get the hang of this as I slog through, but it's still a bit rough! I'm able to derive a new archive from binary_oarchive_impl, but for some reason, I can't do the same with text_oarchive_impl. Specifically, I get the following error (from MS Visual C++ 8.0, using Boost 1.33.1):
1>..\rsg_text_oarchive.hpp(24) : error C2649: 'basic_text_oprimitive
>' : is not a 'class' 1> ..\rsg_text_oarchive.hpp(40) : see reference to class template instantiation 'rsg_text_oarchive_impl<Archive>' being compiled The similar line in the binary archive works fine. Attached are the two derived archives in question. All I'm trying to do (at this point) is add a short header in the constructor; next, I'll want to add a footer in the destructor.
Thanks! -Bob
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users