diff --git a/include/boost/archive/basic_archive.hpp b/include/boost/archive/basic_archive.hpp index 87cbd4e8..3aed9a07 100644 --- a/include/boost/archive/basic_archive.hpp +++ b/include/boost/archive/basic_archive.hpp @@ -19,6 +19,9 @@ #include #include +#include +#include // must be the last header + namespace boost { namespace archive { @@ -84,14 +87,16 @@ enum archive_flags { no_xml_tag_checking = 4 // suppress checking of xml tags }; -extern const class_id_type null_pointer_tag; +#define NULL_POINTER_TAG class_id_type(-1) -extern const char * ARCHIVE_SIGNATURE; -extern const version_type ARCHIVE_VERSION; +BOOST_DECL_ARCHIVE const char * ARCHIVE_SIGNATURE(); +BOOST_DECL_ARCHIVE unsigned int ARCHIVE_VERSION(); }// namespace archive }// namespace boost +#include // pops abi_suffix.hpp pragmas + #include // set implementation level to primitive for all types @@ -116,4 +121,5 @@ BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type) #error "export.hpp must not be included before any archive header" #endif + #endif //BOOST_ARCHIVE_BASIC_ARCHIVE_HPP diff --git a/include/boost/archive/basic_binary_iarchive.hpp b/include/boost/archive/basic_binary_iarchive.hpp index fcc769df..e2f95e0f 100644 --- a/include/boost/archive/basic_binary_iarchive.hpp +++ b/include/boost/archive/basic_binary_iarchive.hpp @@ -38,13 +38,16 @@ #include +#include // must be the last header + namespace boost { namespace archive { ///////////////////////////////////////////////////////////////////////// // class basic_binary_iarchive - read serialized objects from a input binary stream template -class basic_binary_iarchive : public detail::common_iarchive +class basic_binary_iarchive : + public detail::common_iarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) public: @@ -106,23 +109,19 @@ protected: t = (0 != x); } - void load_override(class_name_type & t, int){ - std::string cn; - cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); - load_override(cn, 0); - if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) - boost::throw_exception( - archive_exception(archive_exception::invalid_class_name) - ); - std::memcpy(t, cn.data(), cn.size()); - // .t is a borland tweak - t.t[cn.size()] = '\0'; - } - - basic_binary_iarchive() {} + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_override(class_name_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(); + + basic_binary_iarchive(){} }; } // namespace archive } // namespace boost +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP diff --git a/include/boost/archive/basic_binary_iprimitive.hpp b/include/boost/archive/basic_binary_iprimitive.hpp index cfcbd3c0..8d406b28 100644 --- a/include/boost/archive/basic_binary_iprimitive.hpp +++ b/include/boost/archive/basic_binary_iprimitive.hpp @@ -25,15 +25,15 @@ #include #include - +#include // std::memcpy #include // std::size_t -#include + +#include #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; - using ::strcpy; using ::size_t; } // namespace std #endif @@ -45,7 +45,8 @@ namespace std{ #include #include -#include + +#include // must be the last header namespace boost { namespace archive { @@ -68,9 +69,6 @@ public: // native streams are always handled as bytes IStream &is; boost::scoped_ptr archive_locale; -// boost::scoped_ptr< -// codecvt_null -// > archive_codecvt; io::basic_ios_locale_saver< BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type > locale_saver; @@ -81,27 +79,41 @@ public: load_binary(& t, sizeof(T)); } - void load(char * t); - void load(wchar_t * t); - void load(std::string &s); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void load(std::wstring &ws); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load(std::wstring &ws); #endif + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load(char * t); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load(wchar_t * t); - void init(); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(); + BOOST_DECL_ARCHIVE_OR_WARCHIVE basic_binary_iprimitive(IStream &is_, bool no_codecvt); + BOOST_DECL_ARCHIVE_OR_WARCHIVE ~basic_binary_iprimitive(); public: - void load_binary(void *address, std::size_t count); + void + load_binary(void *address, std::size_t count); }; template -inline void basic_binary_iprimitive::load_binary( +inline void +basic_binary_iprimitive::load_binary( void *address, std::size_t count ){ assert( - static_cast(std::numeric_limits::max()) >= count + static_cast((std::numeric_limits::max)()) >= count ); if(is.fail()) boost::throw_exception(archive_exception(archive_exception::stream_error)); @@ -125,4 +137,6 @@ inline void basic_binary_iprimitive::load_binary( } // namespace archive } // namespace boost +#include // pop pragams + #endif // BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP diff --git a/include/boost/archive/basic_binary_oarchive.hpp b/include/boost/archive/basic_binary_oarchive.hpp index 55ce2085..721e6b6a 100644 --- a/include/boost/archive/basic_binary_oarchive.hpp +++ b/include/boost/archive/basic_binary_oarchive.hpp @@ -47,7 +47,8 @@ namespace archive { ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream template -class basic_binary_oarchive : public detail::common_oarchive +class basic_binary_oarchive : + public detail::common_oarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) public: @@ -106,7 +107,11 @@ protected: * this->This() << std::string(static_cast(t)); } - basic_binary_oarchive(unsigned int flags = 0){} + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(); + + basic_binary_oarchive(){} }; } // namespace archive diff --git a/include/boost/archive/basic_binary_oprimitive.hpp b/include/boost/archive/basic_binary_oprimitive.hpp index 42a6f095..7197637a 100644 --- a/include/boost/archive/basic_binary_oprimitive.hpp +++ b/include/boost/archive/basic_binary_oprimitive.hpp @@ -77,27 +77,40 @@ public: save_binary(& t, sizeof(T)); } - void save(const char * t); - void save(const wchar_t * t); - void save(const std::string &s); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring &ws); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save(const std::wstring &ws); #endif + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save(const char * t); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save(const wchar_t * t); - void init(); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(); + BOOST_DECL_ARCHIVE_OR_WARCHIVE basic_binary_oprimitive(OStream & os, bool no_codecvt); + BOOST_DECL_ARCHIVE_OR_WARCHIVE ~basic_binary_oprimitive(); public: void save_binary(const void *address, std::size_t count); }; template -inline void basic_binary_oprimitive::save_binary( +inline void +basic_binary_oprimitive::save_binary( const void *address, std::size_t count ){ assert( - static_cast(std::numeric_limits::max()) >= count + static_cast((std::numeric_limits::max)()) >= count ); // note: if the following assertions fail // a likely cause is that the output stream is set to "text" diff --git a/include/boost/archive/basic_text_iarchive.hpp b/include/boost/archive/basic_text_iarchive.hpp index e8a6f34c..5d8844da 100644 --- a/include/boost/archive/basic_text_iarchive.hpp +++ b/include/boost/archive/basic_text_iarchive.hpp @@ -33,13 +33,16 @@ #include +#include // must be the last header + namespace boost { namespace archive { ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream template -class basic_text_iarchive : public detail::common_iarchive +class basic_text_iarchive : + public detail::common_iarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) public: @@ -61,13 +64,25 @@ protected: } // text file don't include the optional information void load_override(class_id_optional_type & /*t*/, int){} - void load_override(class_name_type & t, int); + + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_override(class_name_type & t, int); + + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(void); + basic_text_iarchive() : detail::common_iarchive() {} + + ~basic_text_iarchive(){} }; } // namespace archive } // namespace boost +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP diff --git a/include/boost/archive/basic_text_iprimitive.hpp b/include/boost/archive/basic_text_iprimitive.hpp index 6cc18de8..146d2308 100644 --- a/include/boost/archive/basic_text_iprimitive.hpp +++ b/include/boost/archive/basic_text_iprimitive.hpp @@ -49,7 +49,8 @@ namespace std{ #include #include -#include + +#include // must be the last header namespace boost { namespace archive { @@ -65,13 +66,12 @@ protected: public: #endif IStream &is; - io::ios_flags_saver flags_saver; + io::ios_flags_saver flags_saver; io::ios_precision_saver precision_saver; boost::scoped_ptr archive_locale; io::basic_ios_locale_saver< BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type > locale_saver; - template void load(T & t) { @@ -113,15 +113,19 @@ public: t = static_cast(i); } #endif - - basic_text_iprimitive(IStream &is, bool no_codecvt); + BOOST_DECL_ARCHIVE_OR_WARCHIVE + basic_text_iprimitive(IStream &is, bool no_codecvt); + BOOST_DECL_ARCHIVE_OR_WARCHIVE ~basic_text_iprimitive(); public: - void load_binary(void *address, std::size_t count); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_binary(void *address, std::size_t count); }; } // namespace archive } // namespace boost +#include // pop pragams #endif // BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP diff --git a/include/boost/archive/basic_text_oarchive.hpp b/include/boost/archive/basic_text_oarchive.hpp index aa0c60c1..f7c57113 100644 --- a/include/boost/archive/basic_text_oarchive.hpp +++ b/include/boost/archive/basic_text_oarchive.hpp @@ -27,18 +27,23 @@ #include #include #include - #include + +#include #include + #include +#include // must be the last header + namespace boost { namespace archive { ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream template -class basic_text_oarchive : public detail::common_oarchive +class basic_text_oarchive : + public detail::common_oarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x564)) @@ -62,7 +67,9 @@ protected: delimiter = eol; } - void newtoken(); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + newtoken(); // default processing - invoke serialization library template @@ -90,36 +97,22 @@ protected: void save_override(const class_name_type & t, int){ this->This()->save(std::string(static_cast(t))); } -protected: + + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(); + basic_text_oarchive() : detail::common_oarchive(), delimiter(none) {} - ~basic_text_oarchive() - {} -}; -template -void basic_text_oarchive::newtoken() -{ - switch(delimiter){ - default: - assert(false); - break; - case eol: - this->This()->put('\n'); - delimiter = space; - break; - case space: - this->This()->put(' '); - break; - case none: - delimiter = space; - break; - } -} + ~basic_text_oarchive(){} +}; } // namespace archive } // namespace boost +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP diff --git a/include/boost/archive/basic_text_oprimitive.hpp b/include/boost/archive/basic_text_oprimitive.hpp index c2e0c2c4..70dbf9e2 100644 --- a/include/boost/archive/basic_text_oprimitive.hpp +++ b/include/boost/archive/basic_text_oprimitive.hpp @@ -34,7 +34,6 @@ #include #include // size_t -#include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::size_t; @@ -49,8 +48,10 @@ namespace std{ #include #include +#include #include -#include + +#include // must be the last header namespace boost { namespace archive { @@ -62,13 +63,15 @@ class save_access; template class basic_text_oprimitive { +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS protected: +#else +public: +#endif OStream &os; io::ios_flags_saver flags_saver; io::ios_precision_saver precision_saver; boost::scoped_ptr archive_locale; -// boost::scoped_ptr > -// archive_codecvt; io::basic_ios_locale_saver< BOOST_DEDUCED_TYPENAME OStream::char_type, BOOST_DEDUCED_TYPENAME OStream::traits_type > locale_saver; @@ -139,13 +142,19 @@ public: os.put(*s++); } + BOOST_DECL_ARCHIVE_OR_WARCHIVE basic_text_oprimitive(OStream & os, bool no_codecvt); + BOOST_DECL_ARCHIVE_OR_WARCHIVE ~basic_text_oprimitive(); public: - void save_binary(const void *address, std::size_t count); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_binary(const void *address, std::size_t count); }; } //namespace boost } //namespace archive +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP diff --git a/include/boost/archive/basic_xml_archive.hpp b/include/boost/archive/basic_xml_archive.hpp index 5bdb8075..3d39b3d9 100644 --- a/include/boost/archive/basic_xml_archive.hpp +++ b/include/boost/archive/basic_xml_archive.hpp @@ -16,15 +16,19 @@ // See http://www.boost.org for updates, documentation, and revision history. +#include #include +#include // must be the last header + namespace boost { namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by xml archives // -class xml_archive_exception : public virtual archive_exception +class xml_archive_exception : + public virtual archive_exception { public: typedef enum { @@ -52,17 +56,19 @@ public: }; // constant strings used in xml i/o -extern const char * OBJECT_ID; -extern const char * OBJECT_REFERENCE; -extern const char * CLASS_ID; -extern const char * CLASS_ID_REFERENCE; -extern const char * CLASS_NAME; -extern const char * TRACKING; -extern const char * VERSION; -extern const char * SIGNATURE; +extern BOOST_DECL_ARCHIVE const char * OBJECT_ID(); +extern BOOST_DECL_ARCHIVE const char * OBJECT_REFERENCE(); +extern BOOST_DECL_ARCHIVE const char * CLASS_ID(); +extern BOOST_DECL_ARCHIVE const char * CLASS_ID_REFERENCE(); +extern BOOST_DECL_ARCHIVE const char * CLASS_NAME(); +extern BOOST_DECL_ARCHIVE const char * TRACKING(); +extern BOOST_DECL_ARCHIVE const char * VERSION(); +extern BOOST_DECL_ARCHIVE const char * SIGNATURE(); }// namespace archive }// namespace boost +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP diff --git a/include/boost/archive/basic_xml_iarchive.hpp b/include/boost/archive/basic_xml_iarchive.hpp index c5487895..a4ac7e7a 100644 --- a/include/boost/archive/basic_xml_iarchive.hpp +++ b/include/boost/archive/basic_xml_iarchive.hpp @@ -16,17 +16,17 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include - #include #include #include -#include +//#include #include #include -#include // makes strings prmitive +#include + +#include // must be the last header namespace boost { namespace archive { @@ -34,7 +34,8 @@ namespace archive { ///////////////////////////////////////////////////////////////////////// // class xml_iarchive - read serialized objects from a input text stream template -class basic_xml_iarchive : public detail::common_iarchive +class basic_xml_iarchive : + public detail::common_iarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) public: @@ -50,8 +51,12 @@ protected: bool header; bool no_checking; unsigned int depth; - void load_start(const char *name); - void load_end(const char *name); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_start(const char *name); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_end(const char *name); // Anything not an attribute and not a name-value pair is an // should be trapped here. @@ -83,23 +88,33 @@ protected: // it otherwise it will be loaded as a normal primitive w/o tag and // leaving the archive in an undetermined state void load_override(class_id_optional_type & /* t */, int){} - void load_override(object_id_type & t, int); - void load_override(version_type & t, int); - void load_override(class_id_type & t, int); - void load_override(tracking_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_override(object_id_type & t, int); + BOOST_DECL_ARCHIVE_OR_WARCHIVE + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_override(version_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_override(class_id_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + load_override(tracking_type & t, int); // class_name_type can't be handled here as it depends upon the // char type used by the stream. So require the derived implementation // handle this. // void load_override(class_name_type & t, int); - basic_xml_iarchive(unsigned int flags = 0) : - header(false), - no_checking(false), - depth(0) - {} + BOOST_DECL_ARCHIVE_OR_WARCHIVE + basic_xml_iarchive(unsigned int flags = 0); + BOOST_DECL_ARCHIVE_OR_WARCHIVE + ~basic_xml_iarchive(); }; } // namespace archive } // namespace boost +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP diff --git a/include/boost/archive/basic_xml_oarchive.hpp b/include/boost/archive/basic_xml_oarchive.hpp index f2e51c41..7e5b0d5e 100644 --- a/include/boost/archive/basic_xml_oarchive.hpp +++ b/include/boost/archive/basic_xml_oarchive.hpp @@ -25,13 +25,16 @@ #include #include +#include // must be the last header + namespace boost { namespace archive { ////////////////////////////////////////////////////////////////////// // class xml_oarchive - write serialized objects to a xml output stream template -class basic_xml_oarchive : public detail::common_oarchive +class basic_xml_oarchive : + public detail::common_oarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) public: @@ -49,21 +52,35 @@ protected: bool indent_next; bool pending_preamble; bool header; - void indent(); - void init(); - void write_attribute( + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + indent(); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + init(); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + write_attribute( const char *attribute_name, int t, const char *conjunction = "=\"" ); - void write_attribute( + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + write_attribute( const char *attribute_name, const char *key ); // helpers used below - void save_start(const char *name); - void save_end(const char *name); - void end_preamble(); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_start(const char *name); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_end(const char *name); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + end_preamble(); // Anything not an attribute and not a name-value pair is an // error and should be trapped here. @@ -87,20 +104,40 @@ protected: // specific overrides for attributes - not name value pairs so we // want to trap them before the above "fall through" - void save_override(const object_id_type & t, int); - void save_override(const object_reference_type & t, int); - void save_override(const version_type & t, int); - void save_override(const class_id_type & t, int); - void save_override(const class_id_optional_type & t, int); - void save_override(const class_id_reference_type & t, int); - void save_override(const class_name_type & t, int); - void save_override(const tracking_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const object_id_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const object_reference_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const version_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const class_id_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const class_id_optional_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const class_id_reference_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const class_name_type & t, int); + void + BOOST_DECL_ARCHIVE_OR_WARCHIVE + save_override(const tracking_type & t, int); + BOOST_DECL_ARCHIVE_OR_WARCHIVE basic_xml_oarchive(unsigned int flags = 0); + BOOST_DECL_ARCHIVE_OR_WARCHIVE ~basic_xml_oarchive(); }; } // namespace archive } // namespace boost +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP diff --git a/include/boost/archive/binary_iarchive.hpp b/include/boost/archive/binary_iarchive.hpp index ccd75dcd..48d3f517 100644 --- a/include/boost/archive/binary_iarchive.hpp +++ b/include/boost/archive/binary_iarchive.hpp @@ -17,10 +17,12 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -45,8 +47,13 @@ protected: basic_binary_iarchive::load_override(t, 0); } void init(){ - basic_binary_iarchive::init(); - basic_binary_iprimitive::init(); + #if ! defined(__MWERKS__) + this->basic_binary_iarchive::init(); + this->basic_binary_iprimitive::init(); + #else + basic_binary_iarchive::init(); + basic_binary_iprimitive::init(); + #endif } binary_iarchive_impl(std::istream & is, unsigned int flags = 0) : basic_binary_iprimitive( @@ -55,13 +62,7 @@ protected: ) { if(0 == (flags & no_header)){ - #if ! defined(__MWERKS__) - this->basic_binary_iarchive::init(); - this->basic_binary_iprimitive::init(); - #else - basic_binary_iarchive::init(); - basic_binary_iprimitive::init(); - #endif + init(); } } }; @@ -75,8 +76,7 @@ class binary_iarchive : public: binary_iarchive(std::istream & is, unsigned int flags = 0) : binary_iarchive_impl(is, flags) - { - } + {} }; } // namespace archive @@ -86,4 +86,6 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::binary_iarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BINARY_IARCHIVE_HPP diff --git a/include/boost/archive/binary_oarchive.hpp b/include/boost/archive/binary_oarchive.hpp index 37f6912c..998964ac 100644 --- a/include/boost/archive/binary_oarchive.hpp +++ b/include/boost/archive/binary_oarchive.hpp @@ -17,10 +17,12 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -37,9 +39,21 @@ public: friend class save_access; protected: #endif - void init(){ - basic_binary_oarchive::init(); - basic_binary_oprimitive::init(); + // note: the following should not needed - but one compiler (vc 7.1) + // fails to compile one test (test_shared_ptr) without it !!! + // make this protected so it can be called from a derived archive + template + void save_override(const T & t, BOOST_PFTO int){ + basic_binary_oarchive::save_override(t, 0); + } + void init() { + #if ! defined(__MWERKS__) + this->basic_binary_oarchive::init(); + this->basic_binary_oprimitive::init(); + #else + basic_binary_oarchive::init(); + basic_binary_oprimitive::init(); + #endif } binary_oarchive_impl(std::ostream & os, unsigned int flags = 0) : basic_binary_oprimitive( @@ -47,13 +61,7 @@ protected: 0 != (flags & no_codecvt)) { if(0 == (flags & no_header)){ - #if ! defined(__MWERKS__) - this->basic_binary_oarchive::init(); - this->basic_binary_oprimitive::init(); - #else - basic_binary_oarchive::init(); - basic_binary_oprimitive::init(); - #endif + init(); } } }; @@ -67,8 +75,7 @@ class binary_oarchive : public: binary_oarchive(std::ostream & os, unsigned int flags = 0) : binary_oarchive_impl(os, flags) - { - } + {} }; } // namespace archive @@ -78,4 +85,6 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::binary_oarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_BINARY_OARCHIVE_HPP diff --git a/include/boost/archive/binary_wiarchive.hpp b/include/boost/archive/binary_wiarchive.hpp index a7bdd382..c4befcad 100644 --- a/include/boost/archive/binary_wiarchive.hpp +++ b/include/boost/archive/binary_wiarchive.hpp @@ -22,9 +22,12 @@ #else #include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -57,7 +60,10 @@ protected: 0 != (flags & no_codecvt) ), basic_binary_iarchive() - {} + { + if(0 == (flags & no_header)) + init(); + } }; // do not derive from this class. If you want to extend this functionality @@ -68,15 +74,18 @@ class binary_wiarchive : { public: binary_wiarchive(std::wistream & is, unsigned int flags = 0) : - binary_wiarchive_impl(is, flags | no_header) - { - if(0 == (flags & no_header)) - init(); - } + binary_wiarchive_impl(is, flags) + {} }; } // namespace archive } // namespace boost +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::binary_wiarchive) + +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP diff --git a/include/boost/archive/binary_woarchive.hpp b/include/boost/archive/binary_woarchive.hpp index b9a595cd..8dcbab06 100644 --- a/include/boost/archive/binary_woarchive.hpp +++ b/include/boost/archive/binary_woarchive.hpp @@ -22,9 +22,12 @@ #else #include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -49,9 +52,11 @@ protected: basic_binary_oprimitive( os, 0 != (flags & no_codecvt) - ), - basic_binary_oarchive(flags) - {} + ) + { + if(0 == (flags & no_header)) + init(); + } }; // do not derive from this class. If you want to extend this functionality @@ -62,15 +67,19 @@ class binary_woarchive : { public: binary_woarchive(std::wostream & os, unsigned int flags = 0) : - binary_woarchive_impl(os, flags | no_header) - { - if(0 == (flags & no_header)) - init(); - } + binary_woarchive_impl(os, flags) + {} + ~binary_woarchive(){} }; } // namespace archive } // namespace boost +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::binary_woarchive) + +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP diff --git a/include/boost/archive/codecvt_null.hpp b/include/boost/archive/codecvt_null.hpp index 602c95dc..989b1edf 100644 --- a/include/boost/archive/codecvt_null.hpp +++ b/include/boost/archive/codecvt_null.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // codecvt_null.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2004 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) diff --git a/include/boost/archive/polymorphic_iarchive.hpp b/include/boost/archive/polymorphic_iarchive.hpp index c900cea1..ae063c83 100644 --- a/include/boost/archive/polymorphic_iarchive.hpp +++ b/include/boost/archive/polymorphic_iarchive.hpp @@ -93,10 +93,6 @@ public: virtual void load_end(const char * name) = 0; virtual void register_basic_serializer(const detail::basic_iserializer & bis) = 0; - // utility function implemented by all legal archives - virtual unsigned int library_version() const = 0; - virtual void load_binary(void * t, std::size_t size) = 0; - virtual void delete_created_pointers() = 0; // msvc and borland won't automatically pass these to the base class so @@ -106,7 +102,6 @@ public: { archive::load(* this, t); } - // special treatment for name-value pairs. template void load_override(boost::serialization::nvp & t, int) @@ -116,6 +111,10 @@ public: load_end(t.name()); } public: + // utility function implemented by all legal archives + virtual unsigned int library_version() const = 0; + virtual void load_binary(void * t, std::size_t size) = 0; + // these are used by the serialization library implementation. virtual void load_object( void *t, diff --git a/include/boost/archive/polymorphic_oarchive.hpp b/include/boost/archive/polymorphic_oarchive.hpp index 50804238..964e2a2b 100644 --- a/include/boost/archive/polymorphic_oarchive.hpp +++ b/include/boost/archive/polymorphic_oarchive.hpp @@ -95,8 +95,6 @@ public: virtual unsigned int library_version() const = 0; virtual void end_preamble() = 0; - // utility function implemented by all legal archives - virtual void save_binary(const void * t, std::size_t size) = 0; // msvc and borland won't automatically pass these to the base class so // make it explicit here @@ -114,6 +112,9 @@ public: save_end(t.name()); } public: + // utility function implemented by all legal archives + virtual void save_binary(const void * t, std::size_t size) = 0; + virtual void save_object( const void *x, const detail::basic_oserializer & bos diff --git a/include/boost/archive/text_iarchive.hpp b/include/boost/archive/text_iarchive.hpp index 9d2f3caf..3b1ebafe 100644 --- a/include/boost/archive/text_iarchive.hpp +++ b/include/boost/archive/text_iarchive.hpp @@ -18,9 +18,11 @@ #include -#include -#include +#include #include +#include + +#include // must be the last header namespace boost { namespace archive { @@ -30,7 +32,6 @@ class text_iarchive_impl : public basic_text_iprimitive, public basic_text_iarchive { -protected: #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: #else @@ -43,13 +44,21 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void load(char * t); + void + BOOST_DECL_ARCHIVE + load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void load(wchar_t * t); + void + BOOST_DECL_ARCHIVE + load(wchar_t * t); #endif - void load(std::string &s); + void + BOOST_DECL_ARCHIVE + load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void load(std::wstring &ws); + void + BOOST_DECL_ARCHIVE + load(std::wstring &ws); #endif // note: the following should not needed - but one compiler (vc 7.1) // fails to compile one test (test_shared_ptr) without it !!! @@ -58,16 +67,10 @@ protected: void load_override(T & t, BOOST_PFTO int){ basic_text_iarchive::load_override(t, 0); } - text_iarchive_impl(std::istream & is, unsigned int flags = 0) : - basic_text_iprimitive( - is, - 0 != (flags & no_codecvt) - ), - basic_text_iarchive() - { - if(0 == (flags & no_header)) - basic_text_iarchive::init(); - } + BOOST_DECL_ARCHIVE + text_iarchive_impl(std::istream & is, unsigned int flags = 0); + BOOST_DECL_ARCHIVE + ~text_iarchive_impl(){}; }; // do not derive from this class. If you want to extend this functionality @@ -77,10 +80,11 @@ class text_iarchive : public text_iarchive_impl { public: + text_iarchive(std::istream & is, unsigned int flags = 0) : text_iarchive_impl(is, flags) - { - } + {} + ~text_iarchive(){} }; } // namespace archive @@ -90,4 +94,6 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_iarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_TEXT_IARCHIVE_HPP diff --git a/include/boost/archive/text_oarchive.hpp b/include/boost/archive/text_oarchive.hpp index 1966c22f..0b1b84a6 100644 --- a/include/boost/archive/text_oarchive.hpp +++ b/include/boost/archive/text_oarchive.hpp @@ -17,8 +17,8 @@ // See http://www.boost.org for updates, documentation, and revision history. #include - #include // std::size_t + #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -26,9 +26,12 @@ namespace std{ } // namespace std #endif +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -50,39 +53,31 @@ protected: this->newtoken(); basic_text_oprimitive::save(t); } - void save(const char * t); + void + BOOST_DECL_ARCHIVE + save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void save(const wchar_t * t); + void + BOOST_DECL_ARCHIVE + save(const wchar_t * t); #endif - void save(const std::string &s); + void + BOOST_DECL_ARCHIVE + save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring &ws); + void + BOOST_DECL_ARCHIVE + save(const std::wstring &ws); #endif protected: - text_oarchive_impl(std::ostream & os, unsigned int flags = 0) : - basic_text_oprimitive( - os, - 0 != (flags & no_codecvt) - ), - basic_text_oarchive() - { - if(0 == (flags & no_header)) - basic_text_oarchive::init(); - } + BOOST_DECL_ARCHIVE + text_oarchive_impl(std::ostream & os, unsigned int flags = 0); + BOOST_DECL_ARCHIVE + ~text_oarchive_impl(){}; public: - void save_binary(const void *address, std::size_t count){ - put('\n'); - this->end_preamble(); - #if ! defined(__MWERKS__) - this->basic_text_oprimitive::save_binary( - #else - this->basic_text_oprimitive::save_binary( - #endif - address, - count - ); - this->delimiter = this->eol; - } + void + BOOST_DECL_ARCHIVE + save_binary(const void *address, std::size_t count); }; // do not derive from this class. If you want to extend this functionality @@ -92,10 +87,11 @@ class text_oarchive : public text_oarchive_impl { public: + text_oarchive(std::ostream & os, unsigned int flags = 0) : text_oarchive_impl(os, flags) - { - } + {} + ~text_oarchive(){} }; } // namespace archive @@ -105,4 +101,6 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_oarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_TEXT_OARCHIVE_HPP diff --git a/include/boost/archive/text_wiarchive.hpp b/include/boost/archive/text_wiarchive.hpp index b17bb249..268dd837 100644 --- a/include/boost/archive/text_wiarchive.hpp +++ b/include/boost/archive/text_wiarchive.hpp @@ -17,16 +17,18 @@ // See http://www.boost.org for updates, documentation, and revision history. #include - #ifdef BOOST_NO_STD_WSTREAMBUF #error "wide char i/o not supported on this platform" #else #include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -47,13 +49,13 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void load(char * t); + void BOOST_DECL_WARCHIVE load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void load(wchar_t * t); + void BOOST_DECL_WARCHIVE load(wchar_t * t); #endif - void load(std::string &s); + void BOOST_DECL_WARCHIVE load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void load(std::wstring &ws); + void BOOST_DECL_WARCHIVE load(std::wstring &ws); #endif // note: the following should not needed - but one compiler (vc 7.1) // fails to compile one test (test_shared_ptr) without it !!! @@ -66,25 +68,33 @@ protected: is, 0 != (flags & no_codecvt) ) - {} + { + if(0 == (flags & no_header)) + basic_text_iarchive::init(); + } }; // do not derive from this class. If you want to extend this functionality // via inhertance, derived from text_wiarchive_impl instead. This will // preserve correct static polymorphism. -class text_wiarchive : public text_wiarchive_impl +class text_wiarchive : + public text_wiarchive_impl { public: text_wiarchive(std::wistream & is, unsigned int flags = 0) : - text_wiarchive_impl(is, flags | no_header) - { - if(0 == (flags & no_header)) - basic_text_iarchive::init(); - } + text_wiarchive_impl(is, flags) + {} + ~text_wiarchive(){} }; } // namespace archive } // namespace boost +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_wiarchive) + +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP diff --git a/include/boost/archive/text_woarchive.hpp b/include/boost/archive/text_woarchive.hpp index 37b02be7..b0c7bb84 100644 --- a/include/boost/archive/text_woarchive.hpp +++ b/include/boost/archive/text_woarchive.hpp @@ -17,12 +17,13 @@ // See http://www.boost.org for updates, documentation, and revision history. #include + #ifdef BOOST_NO_STD_WSTREAMBUF #error "wide char i/o not supported on this platform" #else -#include // size_t #include +#include // size_t #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -30,9 +31,12 @@ namespace std{ } // namespace std #endif +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -54,20 +58,23 @@ protected: this->newtoken(); basic_text_oprimitive::save(t); } - void save(const char * t); + void BOOST_DECL_WARCHIVE save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void save(const wchar_t * t); + void BOOST_DECL_WARCHIVE save(const wchar_t * t); #endif - void save(const std::string &s); + void BOOST_DECL_WARCHIVE save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring &ws); + void BOOST_DECL_WARCHIVE save(const std::wstring &ws); #endif text_woarchive_impl(std::wostream & os, unsigned int flags = 0) : basic_text_oprimitive( os, 0 != (flags & no_codecvt) ) - {} + { + if(0 == (flags & no_header)) + basic_text_oarchive::init(); + } public: void save_binary(const void *address, std::size_t count){ put(L'\n'); @@ -97,15 +104,19 @@ class text_woarchive : { public: text_woarchive(std::wostream & os, unsigned int flags = 0) : - text_woarchive_impl(os, flags | no_header) - { - if(0 == (flags & no_header)) - basic_text_oarchive::init(); - } + text_woarchive_impl(os, flags) + {} + ~text_woarchive(){} }; } // namespace archive } // namespace boost +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_woarchive) + +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP diff --git a/include/boost/archive/tmpdir.hpp b/include/boost/archive/tmpdir.hpp index 6a49974f..ada6045e 100644 --- a/include/boost/archive/tmpdir.hpp +++ b/include/boost/archive/tmpdir.hpp @@ -19,6 +19,7 @@ #include // getenv #include +#include #ifdef BOOST_NO_STDC_NAMESPACE namespace std { using ::getenv; diff --git a/include/boost/archive/xml_iarchive.hpp b/include/boost/archive/xml_iarchive.hpp index 8d7f2cbe..deec3e00 100644 --- a/include/boost/archive/xml_iarchive.hpp +++ b/include/boost/archive/xml_iarchive.hpp @@ -19,9 +19,11 @@ #include //#include -#include -#include +#include #include +#include + +#include // must be the last header namespace boost { namespace archive { @@ -57,21 +59,27 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void load(char * t); + void BOOST_DECL_ARCHIVE load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void load(wchar_t * t); + void BOOST_DECL_ARCHIVE load(wchar_t * t); #endif - void load(std::string &s); + void BOOST_DECL_ARCHIVE load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void load(std::wstring &ws); + void BOOST_DECL_ARCHIVE load(std::wstring &ws); #endif template void load_override(T & t, BOOST_PFTO int){ basic_xml_iarchive::load_override(t, 0); } - void load_override(class_name_type & t, int); - void init(); - xml_iarchive_impl(std::istream & is, unsigned int flags = 0) ; + void + BOOST_DECL_ARCHIVE + load_override(class_name_type & t, int); + void + BOOST_DECL_ARCHIVE + init(); + BOOST_DECL_ARCHIVE + xml_iarchive_impl(std::istream & is, unsigned int flags = 0); + BOOST_DECL_ARCHIVE ~xml_iarchive_impl(); }; @@ -88,6 +96,7 @@ public: xml_iarchive(std::istream & is, unsigned int flags = 0) : xml_iarchive_impl(is, flags) {} + ~xml_iarchive(){}; }; } // namespace archive @@ -97,4 +106,6 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_iarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_XML_IARCHIVE_HPP diff --git a/include/boost/archive/xml_oarchive.hpp b/include/boost/archive/xml_oarchive.hpp index 7d1c7e3a..5754174a 100644 --- a/include/boost/archive/xml_oarchive.hpp +++ b/include/boost/archive/xml_oarchive.hpp @@ -26,9 +26,12 @@ namespace std{ } // namespace std #endif +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -52,15 +55,17 @@ protected: void save(const T & t){ basic_text_oprimitive::save(t); } - void save(const char * t); + void BOOST_DECL_ARCHIVE save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void save(const wchar_t * t); + void BOOST_DECL_ARCHIVE save(const wchar_t * t); #endif - void save(const std::string &s); + void BOOST_DECL_ARCHIVE save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring &ws); + void BOOST_DECL_ARCHIVE save(const std::wstring &ws); #endif + BOOST_DECL_ARCHIVE xml_oarchive_impl(std::ostream & os, unsigned int flags = 0); + ~xml_oarchive_impl(){} public: void save_binary(const void *address, std::size_t count){ this->end_preamble(); @@ -89,6 +94,7 @@ public: xml_oarchive(std::ostream & os, unsigned int flags = 0) : xml_oarchive_impl(os, flags) {} + ~xml_oarchive(){} }; } // namespace archive @@ -98,4 +104,6 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_oarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP diff --git a/include/boost/archive/xml_wiarchive.hpp b/include/boost/archive/xml_wiarchive.hpp index f3d5f7a9..c8cb74c7 100644 --- a/include/boost/archive/xml_wiarchive.hpp +++ b/include/boost/archive/xml_wiarchive.hpp @@ -24,10 +24,12 @@ #include //#include -#include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -59,22 +61,22 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void load(char * t); + void BOOST_DECL_WARCHIVE load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void load(wchar_t * t); + void BOOST_DECL_WARCHIVE load(wchar_t * t); #endif - void load(std::string &s); + void BOOST_DECL_WARCHIVE load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void load(std::wstring &ws); + void BOOST_DECL_WARCHIVE load(std::wstring &ws); #endif template void load_override(T & t, BOOST_PFTO int){ basic_xml_iarchive::load_override(t, 0); } - void load_override(class_name_type & t, int); - void init(); - xml_wiarchive_impl(std::wistream & is, unsigned int flags = 0) ; - ~xml_wiarchive_impl(); + void BOOST_DECL_WARCHIVE load_override(class_name_type & t, int); + void BOOST_DECL_WARCHIVE init(); + BOOST_DECL_WARCHIVE xml_wiarchive_impl(std::wistream & is, unsigned int flags = 0) ; + BOOST_DECL_WARCHIVE ~xml_wiarchive_impl(); }; // we use the following because we can't use @@ -90,10 +92,17 @@ public: xml_wiarchive(std::wistream & is, unsigned int flags = 0) : xml_wiarchive_impl(is, flags) {} + ~xml_wiarchive(){} }; } // namespace archive } // namespace boost +// required by smart_cast for compilers not implementing +// partial template specialization +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_wiarchive) + +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_NO_STD_WSTREAMBUF #endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP diff --git a/include/boost/archive/xml_woarchive.hpp b/include/boost/archive/xml_woarchive.hpp index 9a7acdee..62d01558 100644 --- a/include/boost/archive/xml_woarchive.hpp +++ b/include/boost/archive/xml_woarchive.hpp @@ -21,11 +21,21 @@ #error "wide char i/o not supported on this platform" #else +#include // size_t +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + #include +#include #include #include +#include // must be the last header + namespace boost { namespace archive { @@ -49,15 +59,17 @@ protected: void save(const T & t){ basic_text_oprimitive::save(t); } - void save(const char * t); + void BOOST_DECL_WARCHIVE save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void save(const wchar_t * t); + void BOOST_DECL_WARCHIVE save(const wchar_t * t); #endif - void save(const std::string &s); + void BOOST_DECL_WARCHIVE save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring &ws); + void BOOST_DECL_WARCHIVE save(const std::wstring &ws); #endif + BOOST_DECL_WARCHIVE xml_woarchive_impl(std::wostream & os, unsigned int flags = 0); + ~xml_woarchive_impl(){} public: void save_binary(const void *address, std::size_t count){ this->end_preamble(); @@ -86,6 +98,7 @@ public: xml_woarchive(std::wostream & os, unsigned int flags = 0) : xml_woarchive_impl(os, flags) {} + ~xml_woarchive(){} }; } // namespace archive @@ -95,5 +108,7 @@ public: // partial template specialization BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_woarchive) +#include // pops abi_suffix.hpp pragmas + #endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_XML_OWARCHIVE_HPP +#endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP