diff options
Diffstat (limited to 'boost/archive')
79 files changed, 554 insertions, 765 deletions
diff --git a/boost/archive/archive_exception.hpp b/boost/archive/archive_exception.hpp index ffb430c6a8..1159d27755 100644 --- a/boost/archive/archive_exception.hpp +++ b/boost/archive/archive_exception.hpp @@ -21,7 +21,6 @@ #include <string> #include <boost/config.hpp> -#include <boost/preprocessor/empty.hpp> #include <boost/archive/detail/decl.hpp> // note: the only reason this is in here is that windows header @@ -40,11 +39,16 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by archives // -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception : +class BOOST_SYMBOL_VISIBLE archive_exception : public virtual std::exception { -protected: +private: char m_buffer[128]; +protected: + BOOST_ARCHIVE_DECL unsigned int + append(unsigned int l, const char * a); + BOOST_ARCHIVE_DECL + archive_exception() BOOST_NOEXCEPT; public: typedef enum { no_exception, // initialized without code @@ -76,19 +80,15 @@ public: // type has been instantiated in more than one module. output_stream_error // error on input stream } exception_code; -public: exception_code code; - archive_exception( + + BOOST_ARCHIVE_DECL archive_exception( exception_code c, const char * e1 = NULL, const char * e2 = NULL - ); - virtual ~archive_exception() throw(); - virtual const char *what() const throw(); -protected: - unsigned int - append(unsigned int l, const char * a); - archive_exception(); + ) BOOST_NOEXCEPT; + virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; + virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ; }; }// namespace archive diff --git a/boost/archive/basic_archive.hpp b/boost/archive/basic_archive.hpp index 0412112352..ce7ac99a6d 100644 --- a/boost/archive/basic_archive.hpp +++ b/boost/archive/basic_archive.hpp @@ -69,7 +69,7 @@ public: } }; -BOOST_ARCHIVE_DECL(library_version_type) +BOOST_ARCHIVE_DECL library_version_type BOOST_ARCHIVE_VERSION(); class version_type { @@ -242,7 +242,7 @@ enum archive_flags { flags_last = 8 }; -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_SIGNATURE(); /* NOTE : Warning : Warning : Warning : Warning : Warning diff --git a/boost/archive/basic_binary_iarchive.hpp b/boost/archive/basic_binary_iarchive.hpp index a649d5e919..c0cc655c99 100644 --- a/boost/archive/basic_binary_iarchive.hpp +++ b/boost/archive/basic_binary_iarchive.hpp @@ -25,7 +25,6 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/basic_archive.hpp> #include <boost/archive/detail/common_iarchive.hpp> @@ -51,7 +50,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_binary_iarchive - read serialized objects from a input binary stream template<class Archive> -class basic_binary_iarchive : +class BOOST_SYMBOL_VISIBLE basic_binary_iarchive : public detail::common_iarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -72,8 +71,8 @@ protected: // note extra nonsense to sneak it pass the borland compiers typedef detail::common_iarchive<Archive> detail_common_iarchive; template<class T> - void load_override(T & t, BOOST_PFTO int version){ - this->detail_common_iarchive::load_override(t, static_cast<int>(version)); + void load_override(T & t){ + this->detail_common_iarchive::load_override(t); } // include these to trap a change in binary format which @@ -86,7 +85,7 @@ protected: BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); // binary files don't include the optional information - void load_override(class_id_optional_type & /* t */, int){} + void load_override(class_id_optional_type & /* t */){} void load_override(tracking_type & t, int /*version*/){ library_version_type lvt = this->get_library_version(); @@ -101,10 +100,10 @@ protected: t = boost::archive::tracking_type(x); } } - void load_override(class_id_type & t, int version){ + void load_override(class_id_type & t){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_iarchive::load_override(t, version); + this->detail_common_iarchive::load_override(t); } else if(boost::archive::library_version_type(6) < lvt){ @@ -118,37 +117,14 @@ protected: t = boost::archive::class_id_type(x); } } - void load_override(class_id_reference_type & t, int version){ - load_override(static_cast<class_id_type &>(t), version); + void load_override(class_id_reference_type & t){ + load_override(static_cast<class_id_type &>(t)); } -#if 0 - void load_override(class_id_reference_type & t, int version){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_iarchive::load_override(t, version); - } - else - if(boost::archive::library_version_type(6) < lvt){ - int_least16_t x=0; - * this->This() >> x; - t = boost::archive::class_id_reference_type( - boost::archive::class_id_type(x) - ); - } - else{ - int x=0; - * this->This() >> x; - t = boost::archive::class_id_reference_type( - boost::archive::class_id_type(x) - ); - } - } -#endif - void load_override(version_type & t, int version){ + void load_override(version_type & t){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_iarchive::load_override(t, version); + this->detail_common_iarchive::load_override(t); } else if(boost::archive::library_version_type(6) < lvt){ @@ -176,11 +152,11 @@ protected: } } - void load_override(boost::serialization::item_version_type & t, int version){ + void load_override(boost::serialization::item_version_type & t){ library_version_type lvt = this->get_library_version(); // if(boost::archive::library_version_type(7) < lvt){ if(boost::archive::library_version_type(6) < lvt){ - this->detail_common_iarchive::load_override(t, version); + this->detail_common_iarchive::load_override(t); } else if(boost::archive::library_version_type(6) < lvt){ @@ -195,9 +171,9 @@ protected: } } - void load_override(serialization::collection_size_type & t, int version){ + void load_override(serialization::collection_size_type & t){ if(boost::archive::library_version_type(5) < this->get_library_version()){ - this->detail_common_iarchive::load_override(t, version); + this->detail_common_iarchive::load_override(t); } else{ unsigned int x=0; @@ -206,9 +182,9 @@ protected: } } - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - load_override(class_name_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + load_override(class_name_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); basic_binary_iarchive(unsigned int flags) : diff --git a/boost/archive/basic_binary_iprimitive.hpp b/boost/archive/basic_binary_iprimitive.hpp index 4b4199126b..5e826310d7 100644 --- a/boost/archive/basic_binary_iprimitive.hpp +++ b/boost/archive/basic_binary_iprimitive.hpp @@ -67,8 +67,7 @@ class codecvt_null; ///////////////////////////////////////////////////////////////////////////// // class binary_iarchive - read serialized objects from a input binary stream template<class Archive, class Elem, class Tr> -class basic_binary_iprimitive -{ +class BOOST_SYMBOL_VISIBLE basic_binary_iprimitive { #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS friend class load_access; protected: @@ -103,25 +102,25 @@ public: BOOST_ASSERT(0 == i || 1 == i); (void)i; // warning suppression for release builds. } - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load(std::wstring &ws); #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load(char * t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load(wchar_t * t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_iprimitive( std::basic_streambuf<Elem, Tr> & sb, bool no_codecvt ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_binary_iprimitive(); public: // we provide an optimized load for all fundamental types diff --git a/boost/archive/basic_binary_oarchive.hpp b/boost/archive/basic_binary_oarchive.hpp index f8b53e9d7c..f05f2f86d5 100644 --- a/boost/archive/basic_binary_oarchive.hpp +++ b/boost/archive/basic_binary_oarchive.hpp @@ -26,7 +26,6 @@ #include <boost/assert.hpp> #include <boost/config.hpp> #include <boost/detail/workaround.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/integer.hpp> #include <boost/integer_traits.hpp> @@ -59,8 +58,8 @@ namespace detail { // does have the virtue of buiding the smalles archive in the minimum amount // of time. So under some circumstances it may be he right choice. template<class Archive> -class basic_binary_oarchive : - public archive::detail::common_oarchive<Archive> +class BOOST_SYMBOL_VISIBLE basic_binary_oarchive : + public detail::common_oarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: @@ -77,8 +76,8 @@ protected: // any datatype not specifed below will be handled by base class typedef detail::common_oarchive<Archive> detail_common_oarchive; template<class T> - void save_override(const T & t, BOOST_PFTO int version){ - this->detail_common_oarchive::save_override(t, static_cast<int>(version)); + void save_override(const T & t){ + this->detail_common_oarchive::save_override(t); } // include these to trap a change in binary format which @@ -92,14 +91,14 @@ protected: BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); // binary files don't include the optional information - void save_override(const class_id_optional_type & /* t */, int){} + void save_override(const class_id_optional_type & /* t */){} // enable this if we decide to support generation of previous versions #if 0 - void save_override(const boost::archive::version_type & t, int version){ + void save_override(const boost::archive::version_type & t){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_oarchive::save_override(t, version); + this->detail_common_oarchive::save_override(t); } else if(boost::archive::library_version_type(6) < lvt){ @@ -111,10 +110,10 @@ protected: * this->This() << x; } } - void save_override(const boost::serialization::item_version_type & t, int version){ + void save_override(const boost::serialization::item_version_type & t){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_oarchive::save_override(t, version); + this->detail_common_oarchive::save_override(t); } else if(boost::archive::library_version_type(6) < lvt){ @@ -127,10 +126,10 @@ protected: } } - void save_override(class_id_type & t, int version){ + void save_override(class_id_type & t){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_oarchive::save_override(t, version); + this->detail_common_oarchive::save_override(t); } else if(boost::archive::library_version_type(6) < lvt){ @@ -142,20 +141,20 @@ protected: * this->This() << x; } } - void save_override(class_id_reference_type & t, int version){ - save_override(static_cast<class_id_type &>(t), version); + void save_override(class_id_reference_type & t){ + save_override(static_cast<class_id_type &>(t)); } #endif // explicitly convert to char * to avoid compile ambiguities - void save_override(const class_name_type & t, int){ + void save_override(const class_name_type & t){ const std::string s(t); * this->This() << s; } #if 0 - void save_override(const serialization::collection_size_type & t, int){ + void save_override(const serialization::collection_size_type & t){ if (get_library_version() < boost::archive::library_version_type(6)){ unsigned int x=0; * this->This() >> x; @@ -166,7 +165,7 @@ protected: } } #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); basic_binary_oarchive(unsigned int flags) : diff --git a/boost/archive/basic_binary_oprimitive.hpp b/boost/archive/basic_binary_oprimitive.hpp index a79cd1dacb..077d705ef1 100644 --- a/boost/archive/basic_binary_oprimitive.hpp +++ b/boost/archive/basic_binary_oprimitive.hpp @@ -61,7 +61,7 @@ class codecvt_null; // class basic_binary_oprimitive - binary output of prmitives template<class Archive, class Elem, class Tr> -class basic_binary_oprimitive { +class BOOST_SYMBOL_VISIBLE basic_binary_oprimitive { #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS friend class save_access; protected: @@ -94,26 +94,26 @@ public: BOOST_ASSERT(0 == static_cast<int>(t) || 1 == static_cast<int>(t)); save_binary(& t, sizeof(t)); } - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save(const char * t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save(const wchar_t * t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive( std::basic_streambuf<Elem, Tr> & sb, bool no_codecvt ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_binary_oprimitive(); public: diff --git a/boost/archive/basic_text_iarchive.hpp b/boost/archive/basic_text_iarchive.hpp index 0e78ff6d14..583041d8b4 100644 --- a/boost/archive/basic_text_iarchive.hpp +++ b/boost/archive/basic_text_iarchive.hpp @@ -25,7 +25,6 @@ // use two template parameters #include <boost/config.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/detail/workaround.hpp> #include <boost/archive/detail/common_iarchive.hpp> @@ -47,7 +46,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream template<class Archive> -class basic_text_iarchive : +class BOOST_SYMBOL_VISIBLE basic_text_iarchive : public detail::common_iarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -67,16 +66,16 @@ protected: // template ordering typedef detail::common_iarchive<Archive> detail_common_iarchive; template<class T> - void load_override(T & t, BOOST_PFTO int){ - this->detail_common_iarchive::load_override(t, 0); + void load_override(T & t){ + this->detail_common_iarchive::load_override(t); } // text file don't include the optional information - void load_override(class_id_optional_type & /*t*/, int){} + void load_override(class_id_optional_type & /*t*/){} - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - load_override(class_name_type & t, int); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + load_override(class_name_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(void); basic_text_iarchive(unsigned int flags) : diff --git a/boost/archive/basic_text_iprimitive.hpp b/boost/archive/basic_text_iprimitive.hpp index dabc3c8710..08da95c36e 100644 --- a/boost/archive/basic_text_iprimitive.hpp +++ b/boost/archive/basic_text_iprimitive.hpp @@ -64,7 +64,7 @@ namespace archive { #endif template<class IStream> -class basic_text_iprimitive { +class BOOST_SYMBOL_VISIBLE basic_text_iprimitive { protected: IStream &is; io::ios_flags_saver flags_saver; @@ -116,12 +116,12 @@ protected: t = i; } #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_iprimitive(IStream &is, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_text_iprimitive(); public: - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_binary(void *address, std::size_t count); }; diff --git a/boost/archive/basic_text_oarchive.hpp b/boost/archive/basic_text_oarchive.hpp index 0c60a310f0..6f7f8fb167 100644 --- a/boost/archive/basic_text_oarchive.hpp +++ b/boost/archive/basic_text_oarchive.hpp @@ -25,7 +25,6 @@ // use two template parameters #include <boost/config.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/detail/workaround.hpp> #include <boost/archive/detail/common_oarchive.hpp> #include <boost/serialization/string.hpp> @@ -47,7 +46,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_text_oarchive template<class Archive> -class basic_text_oarchive : +class BOOST_SYMBOL_VISIBLE basic_text_oarchive : public detail::common_oarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -69,7 +68,7 @@ protected: space } delimiter; - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void newtoken(); void newline(){ @@ -80,25 +79,25 @@ protected: // extra stuff to get it passed borland compilers typedef detail::common_oarchive<Archive> detail_common_oarchive; template<class T> - void save_override(T & t, BOOST_PFTO int){ - this->detail_common_oarchive::save_override(t, 0); + void save_override(T & t){ + this->detail_common_oarchive::save_override(t); } // start new objects on a new line - void save_override(const object_id_type & t, int){ + void save_override(const object_id_type & t){ this->This()->newline(); - this->detail_common_oarchive::save_override(t, 0); + this->detail_common_oarchive::save_override(t); } // text file don't include the optional information - void save_override(const class_id_optional_type & /* t */, int){} + void save_override(const class_id_optional_type & /* t */){} - void save_override(const class_name_type & t, int){ + void save_override(const class_name_type & t){ const std::string s(t); * this->This() << s; } - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); basic_text_oarchive(unsigned int flags) : diff --git a/boost/archive/basic_text_oprimitive.hpp b/boost/archive/basic_text_oprimitive.hpp index 3c4cb5bddb..86330921d2 100644 --- a/boost/archive/basic_text_oprimitive.hpp +++ b/boost/archive/basic_text_oprimitive.hpp @@ -64,7 +64,7 @@ namespace archive { ///////////////////////////////////////////////////////////////////////// // class basic_text_oprimitive - output of prmitives to stream template<class OStream> -class basic_text_oprimitive +class BOOST_SYMBOL_VISIBLE basic_text_oprimitive { protected: OStream &os; @@ -174,9 +174,9 @@ protected: save_impl(t, tf); } - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive(OStream & os, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_text_oprimitive(); public: // unformatted append of one character @@ -192,7 +192,7 @@ public: while('\0' != *s) os.put(*s++); } - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save_binary(const void *address, std::size_t count); }; diff --git a/boost/archive/basic_xml_archive.hpp b/boost/archive/basic_xml_archive.hpp index a4ad3a2f06..bef368b973 100644 --- a/boost/archive/basic_xml_archive.hpp +++ b/boost/archive/basic_xml_archive.hpp @@ -27,35 +27,35 @@ namespace archive { // constant strings used in xml i/o extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_OBJECT_ID(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_OBJECT_REFERENCE(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_ID(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_NAME(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_TRACKING(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_VERSION(); extern -BOOST_ARCHIVE_DECL(const char *) +BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_SIGNATURE(); }// namespace archive diff --git a/boost/archive/basic_xml_iarchive.hpp b/boost/archive/basic_xml_iarchive.hpp index 5047fef26c..7834d8a100 100644 --- a/boost/archive/basic_xml_iarchive.hpp +++ b/boost/archive/basic_xml_iarchive.hpp @@ -17,7 +17,6 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <boost/config.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/detail/workaround.hpp> #include <boost/archive/detail/common_iarchive.hpp> @@ -44,7 +43,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class xml_iarchive - read serialized objects from a input text stream template<class Archive> -class basic_xml_iarchive : +class BOOST_SYMBOL_VISIBLE basic_xml_iarchive : public detail::common_iarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -60,21 +59,21 @@ protected: #endif #endif unsigned int depth; - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_start(const char *name); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_end(const char *name); // Anything not an attribute and not a name-value pair is an // should be trapped here. template<class T> - void load_override(T & t, BOOST_PFTO int) + void load_override(T & t) { // If your program fails to compile here, its most likely due to // not specifying an nvp wrapper around the variable to // be serialized. BOOST_MPL_ASSERT((serialization::is_wrapper< T >)); - this->detail_common_iarchive::load_override(t, 0); + this->detail_common_iarchive::load_override(t); } // Anything not an attribute - see below - should be a name value @@ -82,14 +81,10 @@ protected: typedef detail::common_iarchive<Archive> detail_common_iarchive; template<class T> void load_override( - #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - const - #endif - boost::serialization::nvp< T > & t, - int + const boost::serialization::nvp< T > & t ){ this->This()->load_start(t.name()); - this->detail_common_iarchive::load_override(t.value(), 0); + this->detail_common_iarchive::load_override(t.value()); this->This()->load_end(t.name()); } @@ -101,23 +96,23 @@ protected: // an xml archive. So we can skip it here. Note: we MUST override // 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){} - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - load_override(object_id_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - load_override(version_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - load_override(class_id_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - load_override(tracking_type & t, int); + void load_override(class_id_optional_type & /* t */){} + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + load_override(object_id_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + load_override(version_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + load_override(class_id_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + load_override(tracking_type & t); // 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); + // void load_override(class_name_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_iarchive(unsigned int flags); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_xml_iarchive(); }; diff --git a/boost/archive/basic_xml_oarchive.hpp b/boost/archive/basic_xml_oarchive.hpp index 8a039fa16d..0325eee653 100644 --- a/boost/archive/basic_xml_oarchive.hpp +++ b/boost/archive/basic_xml_oarchive.hpp @@ -18,7 +18,6 @@ #include <boost/config.hpp> #include <boost/mpl/assert.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/detail/workaround.hpp> #include <boost/archive/detail/common_oarchive.hpp> @@ -45,7 +44,7 @@ namespace detail { ////////////////////////////////////////////////////////////////////// // class basic_xml_oarchive - write serialized objects to a xml output stream template<class Archive> -class basic_xml_oarchive : +class BOOST_SYMBOL_VISIBLE basic_xml_oarchive : public detail::common_oarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -65,78 +64,74 @@ protected: unsigned int depth; bool indent_next; bool pending_preamble; - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void indent(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void write_attribute( const char *attribute_name, int t, const char *conjunction = "=\"" ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void write_attribute( const char *attribute_name, const char *key ); // helpers used below - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save_start(const char *name); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save_end(const char *name); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void end_preamble(); // Anything not an attribute and not a name-value pair is an // error and should be trapped here. template<class T> - void save_override(T & t, BOOST_PFTO int) + void save_override(T & t) { // If your program fails to compile here, its most likely due to // not specifying an nvp wrapper around the variable to // be serialized. BOOST_MPL_ASSERT((serialization::is_wrapper< T >)); - this->detail_common_oarchive::save_override(t, 0); + this->detail_common_oarchive::save_override(t); } // special treatment for name-value pairs. typedef detail::common_oarchive<Archive> detail_common_oarchive; template<class T> void save_override( - #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - const - #endif - ::boost::serialization::nvp< T > & t, - int + const ::boost::serialization::nvp< T > & t ){ this->This()->save_start(t.name()); - this->detail_common_oarchive::save_override(t.const_value(), 0); + this->detail_common_oarchive::save_override(t.const_value()); this->This()->save_end(t.name()); } // specific overrides for attributes - not name value pairs so we // want to trap them before the above "fall through" - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const object_id_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const object_reference_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const version_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const class_id_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const class_id_optional_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const class_id_reference_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const class_name_type & t, int); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) - save_override(const tracking_type & t, int); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const object_id_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const object_reference_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const version_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const class_id_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const class_id_optional_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const class_id_reference_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const class_name_type & t); + BOOST_ARCHIVE_OR_WARCHIVE_DECL void + save_override(const tracking_type & t); + + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_oarchive(unsigned int flags); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_xml_oarchive(); }; diff --git a/boost/archive/binary_iarchive.hpp b/boost/archive/binary_iarchive.hpp index ce67ccabd0..785ce7610b 100644 --- a/boost/archive/binary_iarchive.hpp +++ b/boost/archive/binary_iarchive.hpp @@ -31,7 +31,7 @@ namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_iarchive_impl instead. This will // preserve correct static polymorphism. -class binary_iarchive : +class BOOST_SYMBOL_VISIBLE binary_iarchive : public binary_iarchive_impl< boost::archive::binary_iarchive, std::istream::char_type, diff --git a/boost/archive/binary_iarchive_impl.hpp b/boost/archive/binary_iarchive_impl.hpp index a9afe61688..3ff994ad83 100644 --- a/boost/archive/binary_iarchive_impl.hpp +++ b/boost/archive/binary_iarchive_impl.hpp @@ -17,7 +17,6 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <istream> -#include <boost/serialization/pfto.hpp> #include <boost/archive/basic_binary_iprimitive.hpp> #include <boost/archive/basic_binary_iarchive.hpp> @@ -54,12 +53,9 @@ protected: friend class load_access; #endif #endif - // 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<class T> - void load_override(T & t, BOOST_PFTO int){ - this->basic_binary_iarchive<Archive>::load_override(t, 0L); + void load_override(T & t){ + this->basic_binary_iarchive<Archive>::load_override(t); } void init(unsigned int flags){ if(0 != (flags & no_header)) diff --git a/boost/archive/binary_oarchive.hpp b/boost/archive/binary_oarchive.hpp index 89a86da418..e8313fd7c9 100644 --- a/boost/archive/binary_oarchive.hpp +++ b/boost/archive/binary_oarchive.hpp @@ -32,7 +32,7 @@ namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_oarchive_impl instead. This will // preserve correct static polymorphism. -class binary_oarchive : +class BOOST_SYMBOL_VISIBLE binary_oarchive : public binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type > diff --git a/boost/archive/binary_oarchive_impl.hpp b/boost/archive/binary_oarchive_impl.hpp index a8c97333ec..76e3a6565b 100644 --- a/boost/archive/binary_oarchive_impl.hpp +++ b/boost/archive/binary_oarchive_impl.hpp @@ -18,7 +18,6 @@ #include <ostream> #include <boost/config.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/basic_binary_oprimitive.hpp> #include <boost/archive/basic_binary_oarchive.hpp> @@ -55,12 +54,9 @@ protected: friend class save_access; #endif #endif - // 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<class T> - void save_override(T & t, BOOST_PFTO int){ - this->basic_binary_oarchive<Archive>::save_override(t, 0L); + void save_override(T & t){ + this->basic_binary_oarchive<Archive>::save_override(t); } void init(unsigned int flags) { if(0 != (flags & no_header)) diff --git a/boost/archive/codecvt_null.hpp b/boost/archive/codecvt_null.hpp index 75387a970e..324122b78a 100644 --- a/boost/archive/codecvt_null.hpp +++ b/boost/archive/codecvt_null.hpp @@ -61,7 +61,7 @@ public: template<> class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t> { - virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result) + virtual BOOST_WARCHIVE_DECL std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -71,7 +71,7 @@ class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t> char * last2, char * & next2 ) const; - virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result) + virtual BOOST_WARCHIVE_DECL std::codecvt_base::result do_in( std::mbstate_t & state, const char * first1, diff --git a/boost/archive/detail/abi_prefix.hpp b/boost/archive/detail/abi_prefix.hpp index e39ef11f18..debf79e9f0 100644 --- a/boost/archive/detail/abi_prefix.hpp +++ b/boost/archive/detail/abi_prefix.hpp @@ -14,7 +14,3 @@ # pragma warning(disable : 4251 4231 4660 4275) #endif -#if defined( __BORLANDC__ ) -#pragma nopushoptwarn -#endif - diff --git a/boost/archive/detail/abi_suffix.hpp b/boost/archive/detail/abi_suffix.hpp index a283b36cf3..4e054d6621 100644 --- a/boost/archive/detail/abi_suffix.hpp +++ b/boost/archive/detail/abi_suffix.hpp @@ -13,7 +13,3 @@ #endif #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -#if defined( __BORLANDC__ ) -#pragma nopushoptwarn -#endif - diff --git a/boost/archive/detail/archive_serializer_map.hpp b/boost/archive/detail/archive_serializer_map.hpp index 53fcae4045..5432bfc73e 100644 --- a/boost/archive/detail/archive_serializer_map.hpp +++ b/boost/archive/detail/archive_serializer_map.hpp @@ -36,12 +36,11 @@ namespace detail { class basic_serializer; template<class Archive> -class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) -archive_serializer_map { +class BOOST_SYMBOL_VISIBLE archive_serializer_map { public: - static bool insert(const basic_serializer * bs); - static void erase(const basic_serializer * bs); - static const basic_serializer * find( + static BOOST_ARCHIVE_OR_WARCHIVE_DECL bool insert(const basic_serializer * bs); + static BOOST_ARCHIVE_OR_WARCHIVE_DECL void erase(const basic_serializer * bs); + static BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer * find( const boost::serialization::extended_type_info & type_ ); }; diff --git a/boost/archive/detail/basic_archive_impl.hpp b/boost/archive/detail/basic_archive_impl.hpp deleted file mode 100644 index 860066f89f..0000000000 --- a/boost/archive/detail/basic_archive_impl.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP -#define BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_archive_impl.hpp: - -// (C) Copyright 2002 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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include <set> - -#include <boost/archive/detail/abi_prefix.hpp> // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { -namespace detail { - -////////////////////////////////////////////////////////////////////// -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_archive_impl -{ -}; - -} // namespace detail -} // namespace serialization -} // namespace boost - -#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas - -#endif //BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP - - - diff --git a/boost/archive/detail/basic_config.hpp b/boost/archive/detail/basic_config.hpp deleted file mode 100644 index 4bd2723eb2..0000000000 --- a/boost/archive/detail/basic_config.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP -#define BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -// basic_config.hpp ---------------------------------------------// - -// (c) Copyright Robert Ramey 2004 -// 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) - -// See library home page at http://www.boost.org/libs/serialization - -//----------------------------------------------------------------------------// - -// This header implements separate compilation features as described in -// http://www.boost.org/more/separate_compilation.html - -#include <boost/config.hpp> - -#ifdef BOOST_HAS_DECLSPEC // defined in config system -// we need to import/export our code only if the user has specifically -// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost -// libraries to be dynamically linked, or BOOST_ARCHIVE_DYN_LINK -// if they want just this one to be dynamically linked: -#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ARCHIVE_DYN_LINK) -// export if this is our own source, otherwise import: -#ifdef BOOST_ARCHIVE_SOURCE -# define BOOST_ARCHIVE_DECL __declspec(dllexport) -#else -# define BOOST_ARCHIVE_DECL __declspec(dllimport) -#endif // BOOST_ARCHIVE_SOURCE -#endif // DYN_LINK -#endif // BOOST_HAS_DECLSPEC -// -// if BOOST_ARCHIVE_DECL isn't defined yet define it now: -#ifndef BOOST_ARCHIVE_DECL -#define BOOST_ARCHIVE_DECL -#endif - -#endif // BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP diff --git a/boost/archive/detail/basic_iarchive.hpp b/boost/archive/detail/basic_iarchive.hpp index ce8dbc0793..befd0c75f2 100644 --- a/boost/archive/detail/basic_iarchive.hpp +++ b/boost/archive/detail/basic_iarchive.hpp @@ -37,11 +37,12 @@ namespace archive { namespace detail { class basic_iarchive_impl; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; +class basic_iserializer; +class basic_pointer_iserializer; + ////////////////////////////////////////////////////////////////////// // class basic_iarchive - read serialized objects from a input stream -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive : +class BOOST_SYMBOL_VISIBLE basic_iarchive : private boost::noncopyable, public boost::archive::detail::helper_collection { @@ -56,41 +57,46 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive : virtual void vload(class_name_type &t) = 0; virtual void vload(tracking_type &t) = 0; protected: - basic_iarchive(unsigned int flags); + BOOST_ARCHIVE_DECL basic_iarchive(unsigned int flags); + boost::archive::detail::helper_collection & + get_helper_collection(){ + return *this; + } public: + // some msvc versions require that the following function be public + // otherwise it should really protected. // account for bogus gcc warning #if defined(__GNUC__) virtual #endif - ~basic_iarchive(); + BOOST_ARCHIVE_DECL ~basic_iarchive(); // note: NOT part of the public API. - void next_object_pointer(void *t); - void register_basic_serializer( + BOOST_ARCHIVE_DECL void next_object_pointer(void *t); + BOOST_ARCHIVE_DECL void register_basic_serializer( const basic_iserializer & bis ); - void load_object( + BOOST_ARCHIVE_DECL void load_object( void *t, const basic_iserializer & bis ); - const basic_pointer_iserializer * + BOOST_ARCHIVE_DECL const basic_pointer_iserializer * load_pointer( void * & t, const basic_pointer_iserializer * bpis_ptr, const basic_pointer_iserializer * (*finder)( const boost::serialization::extended_type_info & eti ) - ); // real public API starts here - void + BOOST_ARCHIVE_DECL void set_library_version(library_version_type archive_library_version); - library_version_type + BOOST_ARCHIVE_DECL library_version_type get_library_version() const; - unsigned int + BOOST_ARCHIVE_DECL unsigned int get_flags() const; - void + BOOST_ARCHIVE_DECL void reset_object_address(const void * new_address, const void * old_address); - void + BOOST_ARCHIVE_DECL void delete_created_pointers(); }; diff --git a/boost/archive/detail/basic_iserializer.hpp b/boost/archive/detail/basic_iserializer.hpp index 3bff3e1256..240f0bc06e 100644 --- a/boost/archive/detail/basic_iserializer.hpp +++ b/boost/archive/detail/basic_iserializer.hpp @@ -39,23 +39,23 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; +class basic_iarchive; +class basic_pointer_iserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer : +class BOOST_SYMBOL_VISIBLE basic_iserializer : public basic_serializer { private: basic_pointer_iserializer *m_bpis; protected: - explicit basic_iserializer( + explicit BOOST_ARCHIVE_DECL basic_iserializer( const boost::serialization::extended_type_info & type ); // account for bogus gcc warning #if defined(__GNUC__) virtual #endif - ~basic_iserializer(); + BOOST_ARCHIVE_DECL ~basic_iserializer(); public: bool serialized_as_pointer() const { return m_bpis != NULL; diff --git a/boost/archive/detail/basic_oarchive.hpp b/boost/archive/detail/basic_oarchive.hpp index fe192f0ab3..702c5604bc 100644 --- a/boost/archive/detail/basic_oarchive.hpp +++ b/boost/archive/detail/basic_oarchive.hpp @@ -35,12 +35,12 @@ namespace archive { namespace detail { class basic_oarchive_impl; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; +class basic_oserializer; +class basic_pointer_oserializer; ////////////////////////////////////////////////////////////////////// // class basic_oarchive - write serialized objects to an output stream -class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive : +class BOOST_SYMBOL_VISIBLE basic_oarchive : private boost::noncopyable, public boost::archive::detail::helper_collection { @@ -59,22 +59,26 @@ class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive : virtual void vsave(const class_name_type & t) = 0; virtual void vsave(const tracking_type t) = 0; protected: - basic_oarchive(unsigned int flags = 0); + BOOST_ARCHIVE_DECL basic_oarchive(unsigned int flags = 0); + BOOST_ARCHIVE_DECL boost::archive::detail::helper_collection & + get_helper_collection(){ + return *this; + } // account for bogus gcc warning #if defined(__GNUC__) virtual #endif - ~basic_oarchive(); + BOOST_ARCHIVE_DECL ~basic_oarchive(); public: // note: NOT part of the public interface - void register_basic_serializer( + BOOST_ARCHIVE_DECL void register_basic_serializer( const basic_oserializer & bos ); - void save_object( + BOOST_ARCHIVE_DECL void save_object( const void *x, const basic_oserializer & bos ); - void save_pointer( + BOOST_ARCHIVE_DECL void save_pointer( const void * t, const basic_pointer_oserializer * bpos_ptr ); @@ -82,9 +86,9 @@ public: vsave(NULL_POINTER_TAG); } // real public interface starts here - void end_preamble(); // default implementation does nothing - library_version_type get_library_version() const; - unsigned int get_flags() const; + BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing + BOOST_ARCHIVE_DECL library_version_type get_library_version() const; + BOOST_ARCHIVE_DECL unsigned int get_flags() const; }; } // namespace detail diff --git a/boost/archive/detail/basic_oserializer.hpp b/boost/archive/detail/basic_oserializer.hpp index 6ae063f55d..7a710ba6bc 100644 --- a/boost/archive/detail/basic_oserializer.hpp +++ b/boost/archive/detail/basic_oserializer.hpp @@ -40,23 +40,23 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; +class basic_oarchive; +class basic_pointer_oserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer : +class BOOST_SYMBOL_VISIBLE basic_oserializer : public basic_serializer { private: basic_pointer_oserializer *m_bpos; protected: - explicit basic_oserializer( + explicit BOOST_ARCHIVE_DECL basic_oserializer( const boost::serialization::extended_type_info & type_ ); // account for bogus gcc warning #if defined(__GNUC__) virtual #endif - ~basic_oserializer(); + BOOST_ARCHIVE_DECL ~basic_oserializer(); public: bool serialized_as_pointer() const { return m_bpos != NULL; diff --git a/boost/archive/detail/basic_pointer_iserializer.hpp b/boost/archive/detail/basic_pointer_iserializer.hpp index 86badc1937..23b9f906dc 100644 --- a/boost/archive/detail/basic_pointer_iserializer.hpp +++ b/boost/archive/detail/basic_pointer_iserializer.hpp @@ -37,20 +37,20 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; +class basic_iarchive; +class basic_iserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer +class BOOST_SYMBOL_VISIBLE basic_pointer_iserializer : public basic_serializer { protected: - explicit basic_pointer_iserializer( + explicit BOOST_ARCHIVE_DECL basic_pointer_iserializer( const boost::serialization::extended_type_info & type_ ); // account for bogus gcc warning #if defined(__GNUC__) virtual #endif - ~basic_pointer_iserializer(); + BOOST_ARCHIVE_DECL ~basic_pointer_iserializer(); public: virtual void * heap_allocation() const = 0; virtual const basic_iserializer & get_basic_serializer() const = 0; diff --git a/boost/archive/detail/basic_pointer_oserializer.hpp b/boost/archive/detail/basic_pointer_oserializer.hpp index bafc46a1d7..868e2fa580 100644 --- a/boost/archive/detail/basic_pointer_oserializer.hpp +++ b/boost/archive/detail/basic_pointer_oserializer.hpp @@ -36,14 +36,14 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; +class basic_oarchive; +class basic_oserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer : +class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer : public basic_serializer { protected: - explicit basic_pointer_oserializer( + explicit BOOST_ARCHIVE_DECL basic_pointer_oserializer( const boost::serialization::extended_type_info & type_ ); public: @@ -51,7 +51,7 @@ public: #if defined(__GNUC__) virtual #endif - ~basic_pointer_oserializer(); + BOOST_ARCHIVE_DECL ~basic_pointer_oserializer(); virtual const basic_oserializer & get_basic_serializer() const = 0; virtual void save_object_ptr( basic_oarchive & ar, diff --git a/boost/archive/detail/basic_serializer_map.hpp b/boost/archive/detail/basic_serializer_map.hpp index 202c20e1ff..7934180336 100644 --- a/boost/archive/detail/basic_serializer_map.hpp +++ b/boost/archive/detail/basic_serializer_map.hpp @@ -34,7 +34,7 @@ namespace detail { class basic_serializer; -class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +class BOOST_SYMBOL_VISIBLE basic_serializer_map : public boost::noncopyable { @@ -50,9 +50,9 @@ basic_serializer_map : public > map_type; map_type m_map; public: - bool insert(const basic_serializer * bs); - void erase(const basic_serializer * bs); - const basic_serializer * find( + BOOST_ARCHIVE_DECL bool insert(const basic_serializer * bs); + BOOST_ARCHIVE_DECL void erase(const basic_serializer * bs); + BOOST_ARCHIVE_DECL const basic_serializer * find( const boost::serialization::extended_type_info & type_ ) const; private: diff --git a/boost/archive/detail/common_iarchive.hpp b/boost/archive/detail/common_iarchive.hpp index 45e6d34b3e..b4c44d2767 100644 --- a/boost/archive/detail/common_iarchive.hpp +++ b/boost/archive/detail/common_iarchive.hpp @@ -62,7 +62,7 @@ private: protected: // default processing - invoke serialization library template<class T> - void load_override(T & t, BOOST_PFTO int){ + void load_override(T & t){ archive::load(* this->This(), t); } // default implementations of functions which emit start/end tags for diff --git a/boost/archive/detail/common_oarchive.hpp b/boost/archive/detail/common_oarchive.hpp index 0d7474bcdc..13c71bc5a8 100644 --- a/boost/archive/detail/common_oarchive.hpp +++ b/boost/archive/detail/common_oarchive.hpp @@ -65,7 +65,7 @@ private: protected: // default processing - invoke serialization library template<class T> - void save_override(T & t, BOOST_PFTO int){ + void save_override(T & t){ archive::save(* this->This(), t); } void save_start(const char * /*name*/){} diff --git a/boost/archive/detail/decl.hpp b/boost/archive/detail/decl.hpp index 44e22be96b..bb386d86f8 100644 --- a/boost/archive/detail/decl.hpp +++ b/boost/archive/detail/decl.hpp @@ -22,58 +22,38 @@ // http://www.boost.org/more/separate_compilation.html #include <boost/config.hpp> -#include <boost/preprocessor/facilities/empty.hpp> -#if defined(BOOST_HAS_DECLSPEC) - #if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)) - #if defined(BOOST_ARCHIVE_SOURCE) - #if defined(__BORLANDC__) - #define BOOST_ARCHIVE_DECL(T) T __export - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export - #else - #define BOOST_ARCHIVE_DECL(T) __declspec(dllexport) T - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T - #endif - #else - #if defined(__BORLANDC__) - #define BOOST_ARCHIVE_DECL(T) T __import - #else - #define BOOST_ARCHIVE_DECL(T) __declspec(dllimport) T - #endif - #endif - #if defined(BOOST_WARCHIVE_SOURCE) - #if defined(__BORLANDC__) - #define BOOST_WARCHIVE_DECL(T) T __export - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export - #else - #define BOOST_WARCHIVE_DECL(T) __declspec(dllexport) T - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T - #endif - #else - #if defined(__BORLANDC__) - #define BOOST_WARCHIVE_DECL(T) T __import - #else - #define BOOST_WARCHIVE_DECL(T) __declspec(dllimport) T - #endif - #endif - #if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE) - #if defined(__BORLANDC__) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __import - #else - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllimport) T - #endif - #endif +#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)) + #if defined(BOOST_ARCHIVE_SOURCE) + #define BOOST_ARCHIVE_DECL BOOST_SYMBOL_EXPORT + #else + #define BOOST_ARCHIVE_DECL BOOST_SYMBOL_IMPORT #endif -#endif // BOOST_HAS_DECLSPEC + #if defined(BOOST_WARCHIVE_SOURCE) + #define BOOST_WARCHIVE_DECL BOOST_SYMBOL_EXPORT + #else + #define BOOST_WARCHIVE_DECL BOOST_SYMBOL_IMPORT + #endif + #if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_IMPORT + #endif + + #if defined(BOOST_WARCHIVE_SOURCE) || defined(BOOST_ARCHIVE_SOURCE) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_EXPORT + #else + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_IMPORT + #endif + +#endif #if ! defined(BOOST_ARCHIVE_DECL) - #define BOOST_ARCHIVE_DECL(T) T + #define BOOST_ARCHIVE_DECL #endif #if ! defined(BOOST_WARCHIVE_DECL) - #define BOOST_WARCHIVE_DECL(T) T + #define BOOST_WARCHIVE_DECL #endif #if ! defined(BOOST_ARCHIVE_OR_WARCHIVE_DECL) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL #endif #endif // BOOST_ARCHIVE_DETAIL_DECL_HPP diff --git a/boost/archive/detail/helper_collection.hpp b/boost/archive/detail/helper_collection.hpp index cfa644f7d4..edb4125e30 100644 --- a/boost/archive/detail/helper_collection.hpp +++ b/boost/archive/detail/helper_collection.hpp @@ -55,11 +55,12 @@ class helper_collection collection m_collection; struct predicate { + BOOST_DELETED_FUNCTION(predicate & operator=(const predicate & rhs)) + public: const void * const m_ti; bool operator()(helper_value_type const &rhs) const { return m_ti == rhs.first; } - predicate & operator=(const void * ti); // to suppress warning predicate(const void * ti) : m_ti(ti) {} @@ -69,7 +70,7 @@ protected: ~helper_collection(){} public: template<typename Helper> - Helper& get_helper(void * const id = 0) { + Helper& find_helper(void * const id = 0) { collection::const_iterator it = std::find_if( m_collection.begin(), diff --git a/boost/archive/detail/interface_iarchive.hpp b/boost/archive/detail/interface_iarchive.hpp index b7bd1659f3..4a99e28b59 100644 --- a/boost/archive/detail/interface_iarchive.hpp +++ b/boost/archive/detail/interface_iarchive.hpp @@ -20,6 +20,7 @@ #include <boost/mpl/bool.hpp> #include <boost/archive/detail/auto_link_archive.hpp> #include <boost/archive/detail/iserializer.hpp> +#include <boost/archive/detail/helper_collection.hpp> #include <boost/serialization/singleton.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -27,7 +28,7 @@ namespace boost { namespace archive { namespace detail { -class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; +class basic_pointer_iserializer; template<class Archive> class interface_iarchive @@ -55,9 +56,16 @@ public: this->This()->register_basic_serializer(bpis.get_basic_serializer()); return & bpis; } + template<class Helper> + Helper & + get_helper(void * const id = 0){ + helper_collection & hc = this->This()->get_helper_collection(); + return hc.template find_helper<Helper>(id); + } + template<class T> Archive & operator>>(T & t){ - this->This()->load_override(t, 0); + this->This()->load_override(t); return * this->This(); } diff --git a/boost/archive/detail/interface_oarchive.hpp b/boost/archive/detail/interface_oarchive.hpp index 7ae71768a8..187013b6cd 100644 --- a/boost/archive/detail/interface_oarchive.hpp +++ b/boost/archive/detail/interface_oarchive.hpp @@ -29,7 +29,7 @@ namespace boost { namespace archive { namespace detail { -class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; +class BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_pointer_oserializer; template<class Archive> class interface_oarchive @@ -57,22 +57,25 @@ public: this->This()->register_basic_serializer(bpos.get_basic_serializer()); return & bpos; } + + template<class Helper> + Helper & + get_helper(void * const id = 0){ + helper_collection & hc = this->This()->get_helper_collection(); + return hc.template find_helper<Helper>(id); + } template<class T> - Archive & operator<<(T & t){ - this->This()->save_override(t, 0); + Archive & operator<<(const T & t){ + this->This()->save_override(t); return * this->This(); } // the & operator template<class T> - Archive & operator&(T & t){ - #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - return * this->This() << const_cast<const T &>(t); - #else - return * this->This() << t; - #endif - } + Archive & operator&(const T & t){ + return * this ->This() << t; + }; }; } // namespace detail diff --git a/boost/archive/detail/iserializer.hpp b/boost/archive/detail/iserializer.hpp index 65dfe8e305..d6d3f42f6e 100644 --- a/boost/archive/detail/iserializer.hpp +++ b/boost/archive/detail/iserializer.hpp @@ -58,8 +58,7 @@ namespace std{ #include <boost/serialization/assume_abstract.hpp> #define DONT_USE_HAS_NEW_OPERATOR ( \ - defined(__BORLANDC__) \ - || BOOST_WORKAROUND(__IBMCPP__, < 1210) \ + BOOST_WORKAROUND(__IBMCPP__, < 1210) \ || defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \ ) #if ! DONT_USE_HAS_NEW_OPERATOR @@ -618,40 +617,6 @@ inline void load(Archive & ar, T &t){ typex::invoke(ar, t); } -#if 0 - -// BORLAND -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) -// borland has a couple of problems -// a) if function is partially specialized - see below -// const paramters are transformed to non-const ones -// b) implementation of base_object can't be made to work -// correctly which results in all base_object s being const. -// So, strip off the const for borland. This breaks the trap -// for loading const objects - but I see no alternative -template<class Archive, class T> -inline void load(Archive &ar, const T & t){ - load(ar, const_cast<T &>(t)); -} -#endif - -// let wrappers through. -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -template<class Archive, class T> -inline void load_wrapper(Archive &ar, const T&t, mpl::true_){ - boost::archive::load(ar, const_cast<T&>(t)); -} - -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) -template<class Archive, class T> -inline void load(Archive &ar, const T&t){ - load_wrapper(ar,t,serialization::is_wrapper< T >()); -} -#endif -#endif - -#endif - } // namespace archive } // namespace boost diff --git a/boost/archive/detail/polymorphic_iarchive_route.hpp b/boost/archive/detail/polymorphic_iarchive_route.hpp index a8eb7aa94a..2c57a3f51c 100644 --- a/boost/archive/detail/polymorphic_iarchive_route.hpp +++ b/boost/archive/detail/polymorphic_iarchive_route.hpp @@ -39,8 +39,8 @@ namespace serialization { namespace archive { namespace detail{ -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; +class BOOST_ARCHIVE_DECL basic_iserializer; +class BOOST_ARCHIVE_DECL basic_pointer_iserializer; #ifdef BOOST_MSVC # pragma warning(push) @@ -166,10 +166,13 @@ private: virtual void load_end(const char * name){ ArchiveImplementation::load_end(name); } - virtual void register_basic_serializer(const basic_iserializer & bis){ ArchiveImplementation::register_basic_serializer(bis); } + virtual helper_collection & + get_helper_collection(){ + return ArchiveImplementation::get_helper_collection(); + } public: // this can't be inheriteded because they appear in mulitple // parents diff --git a/boost/archive/detail/polymorphic_oarchive_route.hpp b/boost/archive/detail/polymorphic_oarchive_route.hpp index 9211df2aa7..ae750133a8 100644 --- a/boost/archive/detail/polymorphic_oarchive_route.hpp +++ b/boost/archive/detail/polymorphic_oarchive_route.hpp @@ -39,8 +39,8 @@ namespace serialization { namespace archive { namespace detail{ -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; +class BOOST_ARCHIVE_DECL basic_oserializer; +class BOOST_ARCHIVE_DECL basic_pointer_oserializer; #ifdef BOOST_MSVC # pragma warning(push) @@ -160,6 +160,10 @@ private: virtual void register_basic_serializer(const detail::basic_oserializer & bos){ ArchiveImplementation::register_basic_serializer(bos); } + virtual helper_collection & + get_helper_collection(){ + return ArchiveImplementation::get_helper_collection(); + } public: // this can't be inheriteded because they appear in mulitple // parents diff --git a/boost/archive/impl/archive_serializer_map.ipp b/boost/archive/impl/archive_serializer_map.ipp index c8ad96b3d7..8dabf0d08f 100644 --- a/boost/archive/impl/archive_serializer_map.ipp +++ b/boost/archive/impl/archive_serializer_map.ipp @@ -37,7 +37,7 @@ namespace extra_detail { // anon #endif template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(bool) +BOOST_ARCHIVE_OR_WARCHIVE_DECL bool archive_serializer_map<Archive>::insert(const basic_serializer * bs){ return boost::serialization::singleton< extra_detail::map<Archive> @@ -45,7 +45,7 @@ archive_serializer_map<Archive>::insert(const basic_serializer * bs){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void archive_serializer_map<Archive>::erase(const basic_serializer * bs){ if(boost::serialization::singleton< extra_detail::map<Archive> @@ -57,7 +57,7 @@ archive_serializer_map<Archive>::erase(const basic_serializer * bs){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_serializer *) +BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer * archive_serializer_map<Archive>::find( const boost::serialization::extended_type_info & eti ) { diff --git a/boost/archive/impl/basic_binary_iarchive.ipp b/boost/archive/impl/basic_binary_iarchive.ipp index 5067b09819..d5619ab6cf 100644 --- a/boost/archive/impl/basic_binary_iarchive.ipp +++ b/boost/archive/impl/basic_binary_iarchive.ipp @@ -32,11 +32,11 @@ namespace archive { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // implementation of binary_binary_archive template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_binary_iarchive<Archive>::load_override(class_name_type & t, int){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_binary_iarchive<Archive>::load_override(class_name_type & t){ std::string cn; cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); - load_override(cn, 0); + load_override(cn); if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) boost::serialization::throw_exception( archive_exception(archive_exception::invalid_class_name) @@ -47,8 +47,8 @@ basic_binary_iarchive<Archive>::load_override(class_name_type & t, int){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_binary_iarchive<Archive>::init(){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_binary_iarchive<Archive>::init(void){ // read signature in an archive version independent manner std::string file_signature; diff --git a/boost/archive/impl/basic_binary_iprimitive.ipp b/boost/archive/impl/basic_binary_iprimitive.ipp index e22c3bd66b..bee7bafea9 100644 --- a/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/boost/archive/impl/basic_binary_iprimitive.ipp @@ -37,7 +37,7 @@ namespace archive { // implementation of basic_binary_iprimitive template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive<Archive, Elem, Tr>::init() { // Detect attempts to pass native binary archives across @@ -90,7 +90,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::init() } template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive<Archive, Elem, Tr>::load(wchar_t * ws) { std::size_t l; // number of wchar_t !!! @@ -100,7 +100,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(wchar_t * ws) } template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive<Archive, Elem, Tr>::load(std::string & s) { std::size_t l; @@ -117,7 +117,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(std::string & s) #ifndef BOOST_NO_CWCHAR template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive<Archive, Elem, Tr>::load(char * s) { std::size_t l; @@ -129,7 +129,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(char * s) #ifndef BOOST_NO_STD_WSTRING template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive<Archive, Elem, Tr>::load(std::wstring & ws) { std::size_t l; @@ -145,7 +145,7 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(std::wstring & ws) #endif template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_iprimitive<Archive, Elem, Tr>::basic_binary_iprimitive( std::basic_streambuf<Elem, Tr> & sb, bool no_codecvt @@ -194,7 +194,7 @@ class input_streambuf_access : public std::basic_streambuf<Elem, Tr> { // scoped_ptr requires that archive_locale be a complete type at time of // destruction so define destructor here rather than in the header template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_iprimitive<Archive, Elem, Tr>::~basic_binary_iprimitive(){ // push back unread characters //destructor can't throw ! diff --git a/boost/archive/impl/basic_binary_oarchive.ipp b/boost/archive/impl/basic_binary_oarchive.ipp index 467fd6fe96..d5a019d32b 100644 --- a/boost/archive/impl/basic_binary_oarchive.ipp +++ b/boost/archive/impl/basic_binary_oarchive.ipp @@ -28,11 +28,7 @@ namespace archive { // implementation of binary_binary_oarchive template<class Archive> -#if !defined(__BORLANDC__) -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -#else -void -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oarchive<Archive>::init(){ // write signature in an archive version independent manner const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); diff --git a/boost/archive/impl/basic_binary_oprimitive.ipp b/boost/archive/impl/basic_binary_oprimitive.ipp index 238617d5ed..88cc12433c 100644 --- a/boost/archive/impl/basic_binary_oprimitive.ipp +++ b/boost/archive/impl/basic_binary_oprimitive.ipp @@ -41,7 +41,7 @@ namespace archive { // implementation of basic_binary_oprimitive template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive<Archive, Elem, Tr>::init() { // record native sizes of fundamental types @@ -57,7 +57,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::init() } template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive<Archive, Elem, Tr>::save(const char * s) { std::size_t l = std::strlen(s); @@ -66,7 +66,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const char * s) } template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::string &s) { std::size_t l = static_cast<std::size_t>(s.size()); @@ -76,7 +76,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::string &s) #ifndef BOOST_NO_CWCHAR template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive<Archive, Elem, Tr>::save(const wchar_t * ws) { std::size_t l = std::wcslen(ws); @@ -87,7 +87,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const wchar_t * ws) #ifndef BOOST_NO_STD_WSTRING template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::wstring &ws) { std::size_t l = ws.size(); @@ -97,7 +97,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::wstring &ws) #endif template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive<Archive, Elem, Tr>::basic_binary_oprimitive( std::basic_streambuf<Elem, Tr> & sb, bool no_codecvt @@ -146,7 +146,7 @@ class output_streambuf_access : public std::basic_streambuf<Elem, Tr> { // scoped_ptr requires that g be a complete type at time of // destruction so define destructor here rather than in the header template<class Archive, class Elem, class Tr> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive<Archive, Elem, Tr>::~basic_binary_oprimitive(){ // flush buffer //destructor can't throw diff --git a/boost/archive/impl/basic_text_iarchive.ipp b/boost/archive/impl/basic_text_iarchive.ipp index 8d364f9b5f..9ec8c6588c 100644 --- a/boost/archive/impl/basic_text_iarchive.ipp +++ b/boost/archive/impl/basic_text_iarchive.ipp @@ -29,11 +29,11 @@ namespace archive { // implementation of text_text_archive template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_text_iarchive<Archive>::load_override(class_name_type & t, int){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_text_iarchive<Archive>::load_override(class_name_type & t){ std::string cn; cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); - load_override(cn, 0); + load_override(cn); if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) boost::serialization::throw_exception( archive_exception(archive_exception::invalid_class_name) @@ -44,7 +44,7 @@ basic_text_iarchive<Archive>::load_override(class_name_type & t, int){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_text_iarchive<Archive>::init(void){ // read signature in an archive version independent manner std::string file_signature; diff --git a/boost/archive/impl/basic_text_iprimitive.ipp b/boost/archive/impl/basic_text_iprimitive.ipp index 9b66789698..e245dc540f 100644 --- a/boost/archive/impl/basic_text_iprimitive.ipp +++ b/boost/archive/impl/basic_text_iprimitive.ipp @@ -19,7 +19,6 @@ namespace std{ #endif #include <boost/serialization/throw_exception.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/basic_text_iprimitive.hpp> #include <boost/archive/codecvt_null.hpp> @@ -53,7 +52,7 @@ namespace detail { // translate base64 text into binary and copy into buffer // until buffer is full. template<class IStream> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_text_iprimitive<IStream>::load_binary( void *address, std::size_t count @@ -87,11 +86,7 @@ basic_text_iprimitive<IStream>::load_binary( > binary; - binary i = binary( - BOOST_MAKE_PFTO_WRAPPER( - iterators::istream_iterator<CharType>(is) - ) - ); + binary i = binary(iterators::istream_iterator<CharType>(is)); char * caddr = static_cast<char *>(address); @@ -112,7 +107,7 @@ basic_text_iprimitive<IStream>::load_binary( } template<class IStream> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_iprimitive<IStream>::basic_text_iprimitive( IStream &is_, bool no_codecvt @@ -142,7 +137,7 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive( #endif template<class IStream> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_iprimitive<IStream>::~basic_text_iprimitive(){ is.sync(); } diff --git a/boost/archive/impl/basic_text_oarchive.ipp b/boost/archive/impl/basic_text_oarchive.ipp index 4170c9718f..44bc1401fd 100644 --- a/boost/archive/impl/basic_text_oarchive.ipp +++ b/boost/archive/impl/basic_text_oarchive.ipp @@ -27,7 +27,7 @@ namespace archive { // implementation of basic_text_oarchive template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_text_oarchive<Archive>::newtoken() { switch(delimiter){ @@ -48,7 +48,7 @@ basic_text_oarchive<Archive>::newtoken() } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_text_oarchive<Archive>::init(){ // write signature in an archive version independent manner const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); diff --git a/boost/archive/impl/basic_text_oprimitive.ipp b/boost/archive/impl/basic_text_oprimitive.ipp index 10e2133840..f2b0a10a60 100644 --- a/boost/archive/impl/basic_text_oprimitive.ipp +++ b/boost/archive/impl/basic_text_oprimitive.ipp @@ -10,7 +10,6 @@ #include <cstddef> // NULL #include <algorithm> // std::copy -#include <boost/serialization/pfto.hpp> #include <boost/archive/basic_text_oprimitive.hpp> #include <boost/archive/codecvt_null.hpp> @@ -26,7 +25,7 @@ namespace archive { // translate to base64 and copy in to buffer. template<class OStream> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_text_oprimitive<OStream>::save_binary( const void *address, std::size_t count @@ -59,9 +58,9 @@ basic_text_oprimitive<OStream>::save_binary( boost::archive::iterators::ostream_iterator<CharType> oi(os); std::copy( - base64_text(BOOST_MAKE_PFTO_WRAPPER(static_cast<const char *>(address))), + base64_text(static_cast<const char *>(address)), base64_text( - BOOST_MAKE_PFTO_WRAPPER(static_cast<const char *>(address) + count) + static_cast<const char *>(address) + count ), oi ); @@ -75,7 +74,7 @@ basic_text_oprimitive<OStream>::save_binary( } template<class OStream> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive<OStream>::basic_text_oprimitive( OStream & os_, bool no_codecvt @@ -105,7 +104,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive( #endif template<class OStream> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive<OStream>::~basic_text_oprimitive(){ os << std::endl; } diff --git a/boost/archive/impl/basic_xml_grammar.hpp b/boost/archive/impl/basic_xml_grammar.hpp index 66ca1f0b29..70a6013abc 100644 --- a/boost/archive/impl/basic_xml_grammar.hpp +++ b/boost/archive/impl/basic_xml_grammar.hpp @@ -72,14 +72,14 @@ public: friend struct return_values; private: - typedef BOOST_DEDUCED_TYPENAME std::basic_istream<CharType> IStream; - typedef BOOST_DEDUCED_TYPENAME std::basic_string<CharType> StringType; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::chset<CharType> chset_t; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::chlit<CharType> chlit_t; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::scanner< - BOOST_DEDUCED_TYPENAME std::basic_string<CharType>::iterator + typedef typename std::basic_istream<CharType> IStream; + typedef typename std::basic_string<CharType> StringType; + typedef typename boost::spirit::classic::chset<CharType> chset_t; + typedef typename boost::spirit::classic::chlit<CharType> chlit_t; + typedef typename boost::spirit::classic::scanner< + typename std::basic_string<CharType>::iterator > scanner_t; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::rule<scanner_t> rule_t; + typedef typename boost::spirit::classic::rule<scanner_t> rule_t; // Start grammar definition rule_t Reference, diff --git a/boost/archive/impl/basic_xml_iarchive.ipp b/boost/archive/impl/basic_xml_iarchive.ipp index 52dfde1a23..9e670120f0 100644 --- a/boost/archive/impl/basic_xml_iarchive.ipp +++ b/boost/archive/impl/basic_xml_iarchive.ipp @@ -24,7 +24,7 @@ namespace archive { // implementation of xml_text_archive template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_iarchive<Archive>::load_start(const char *name){ // if there's no name if(NULL == name) @@ -41,7 +41,7 @@ basic_xml_iarchive<Archive>::load_start(const char *name){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_iarchive<Archive>::load_end(const char *name){ // if there's no name if(NULL == name) @@ -77,37 +77,37 @@ basic_xml_iarchive<Archive>::load_end(const char *name){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_iarchive<Archive>::load_override(object_id_type & t, int){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_iarchive<Archive>::load_override(object_id_type & t){ t = object_id_type(this->This()->gimpl->rv.object_id); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_iarchive<Archive>::load_override(version_type & t, int){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_iarchive<Archive>::load_override(version_type & t){ t = version_type(this->This()->gimpl->rv.version); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_iarchive<Archive>::load_override(class_id_type & t, int){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_iarchive<Archive>::load_override(class_id_type & t){ t = class_id_type(this->This()->gimpl->rv.class_id); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_iarchive<Archive>::load_override(tracking_type & t, int){ +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_iarchive<Archive>::load_override(tracking_type & t){ t = this->This()->gimpl->rv.tracking_level; } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_iarchive<Archive>::basic_xml_iarchive(unsigned int flags) : detail::common_iarchive<Archive>(flags), depth(0) {} template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_iarchive<Archive>::~basic_xml_iarchive(){} } // namespace archive diff --git a/boost/archive/impl/basic_xml_oarchive.ipp b/boost/archive/impl/basic_xml_oarchive.ipp index 0c57a12c90..5db1e13096 100644 --- a/boost/archive/impl/basic_xml_oarchive.ipp +++ b/boost/archive/impl/basic_xml_oarchive.ipp @@ -58,7 +58,7 @@ struct XML_name { // implemenations of functions common to both types of xml output template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::write_attribute( const char *attribute_name, int t, @@ -72,7 +72,7 @@ basic_xml_oarchive<Archive>::write_attribute( } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::write_attribute( const char *attribute_name, const char *key @@ -85,7 +85,7 @@ basic_xml_oarchive<Archive>::write_attribute( } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::indent(){ int i; for(i = depth; i-- > 0;) @@ -93,7 +93,7 @@ basic_xml_oarchive<Archive>::indent(){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::save_start(const char *name) { if(NULL == name) @@ -115,7 +115,7 @@ basic_xml_oarchive<Archive>::save_start(const char *name) } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::save_end(const char *name) { if(NULL == name) @@ -139,7 +139,7 @@ basic_xml_oarchive<Archive>::save_end(const char *name) } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::end_preamble(){ if(pending_preamble){ this->This()->put('>'); @@ -148,14 +148,14 @@ basic_xml_oarchive<Archive>::end_preamble(){ } #if 0 template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const object_id_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const object_id_type & t) { int i = t.t; // extra .t is for borland write_attribute(BOOST_ARCHIVE_XML_OBJECT_ID(), i, "=\"_"); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::save_override( const object_reference_type & t, int @@ -164,8 +164,8 @@ basic_xml_oarchive<Archive>::save_override( write_attribute(BOOST_ARCHIVE_XML_OBJECT_REFERENCE(), i, "=\"_"); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const version_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const version_type & t) { int i = t.t; // extra .t is for borland write_attribute(BOOST_ARCHIVE_XML_VERSION(), i); @@ -173,55 +173,52 @@ basic_xml_oarchive<Archive>::save_override(const version_type & t, int) #endif template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const object_id_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const object_id_type & t) { // borland doesn't do conversion of STRONG_TYPEDEFs very well const unsigned int i = t; write_attribute(BOOST_ARCHIVE_XML_OBJECT_ID(), i, "=\"_"); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::save_override( - const object_reference_type & t, - int + const object_reference_type & t ){ const unsigned int i = t; write_attribute(BOOST_ARCHIVE_XML_OBJECT_REFERENCE(), i, "=\"_"); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const version_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const version_type & t) { const unsigned int i = t; write_attribute(BOOST_ARCHIVE_XML_VERSION(), i); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const class_id_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const class_id_type & t) { write_attribute(BOOST_ARCHIVE_XML_CLASS_ID(), t); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::save_override( - const class_id_reference_type & t, - int + const class_id_reference_type & t ){ write_attribute(BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(), t); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::save_override( - const class_id_optional_type & t, - int + const class_id_optional_type & t ){ write_attribute(BOOST_ARCHIVE_XML_CLASS_ID(), t); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const class_name_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const class_name_type & t) { const char * key = t; if(NULL == key) @@ -230,14 +227,14 @@ basic_xml_oarchive<Archive>::save_override(const class_name_type & t, int) } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) -basic_xml_oarchive<Archive>::save_override(const tracking_type & t, int) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void +basic_xml_oarchive<Archive>::save_override(const tracking_type & t) { write_attribute(BOOST_ARCHIVE_XML_TRACKING(), t.t); } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_xml_oarchive<Archive>::init(){ // xml header this->This()->put("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n"); @@ -250,7 +247,7 @@ basic_xml_oarchive<Archive>::init(){ } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_oarchive<Archive>::basic_xml_oarchive(unsigned int flags) : detail::common_oarchive<Archive>(flags), depth(0), @@ -260,7 +257,7 @@ basic_xml_oarchive<Archive>::basic_xml_oarchive(unsigned int flags) : } template<class Archive> -BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_oarchive<Archive>::~basic_xml_oarchive(){ if(0 == (this->get_flags() & no_header)){ BOOST_TRY{ diff --git a/boost/archive/impl/text_iarchive_impl.ipp b/boost/archive/impl/text_iarchive_impl.ipp index f14c0d8e2a..ae4e2750ce 100644 --- a/boost/archive/impl/text_iarchive_impl.ipp +++ b/boost/archive/impl/text_iarchive_impl.ipp @@ -28,7 +28,7 @@ namespace boost { namespace archive { template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_iarchive_impl<Archive>::load(char *s) { std::size_t size; @@ -41,7 +41,7 @@ text_iarchive_impl<Archive>::load(char *s) } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_iarchive_impl<Archive>::load(std::string &s) { std::size_t size; @@ -60,7 +60,7 @@ text_iarchive_impl<Archive>::load(std::string &s) #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_iarchive_impl<Archive>::load(wchar_t *ws) { std::size_t size; @@ -74,7 +74,7 @@ text_iarchive_impl<Archive>::load(wchar_t *ws) #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_iarchive_impl<Archive>::load(std::wstring &ws) { std::size_t size; @@ -93,19 +93,19 @@ text_iarchive_impl<Archive>::load(std::wstring &ws) #endif // BOOST_NO_CWCHAR template<class Archive> -BOOST_ARCHIVE_DECL(void) -text_iarchive_impl<Archive>::load_override(class_name_type & t, int){ - basic_text_iarchive<Archive>::load_override(t, 0); +BOOST_ARCHIVE_DECL void +text_iarchive_impl<Archive>::load_override(class_name_type & t){ + basic_text_iarchive<Archive>::load_override(t); } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_iarchive_impl<Archive>::init(){ basic_text_iarchive<Archive>::init(); } template<class Archive> -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL text_iarchive_impl<Archive>::text_iarchive_impl( std::istream & is, unsigned int flags diff --git a/boost/archive/impl/text_oarchive_impl.ipp b/boost/archive/impl/text_oarchive_impl.ipp index 2df0b46019..4ff488f4cb 100644 --- a/boost/archive/impl/text_oarchive_impl.ipp +++ b/boost/archive/impl/text_oarchive_impl.ipp @@ -38,7 +38,7 @@ namespace archive { // of template parameters used to create a text_oprimitive template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_oarchive_impl<Archive>::save(const char * s) { const std::size_t len = std::ostream::traits_type::length(s); @@ -48,7 +48,7 @@ text_oarchive_impl<Archive>::save(const char * s) } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_oarchive_impl<Archive>::save(const std::string &s) { const std::size_t size = s.size(); @@ -60,7 +60,7 @@ text_oarchive_impl<Archive>::save(const std::string &s) #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_oarchive_impl<Archive>::save(const wchar_t * ws) { const std::size_t l = std::wcslen(ws); @@ -72,7 +72,7 @@ text_oarchive_impl<Archive>::save(const wchar_t * ws) #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_oarchive_impl<Archive>::save(const std::wstring &ws) { const std::size_t l = ws.size(); @@ -84,7 +84,7 @@ text_oarchive_impl<Archive>::save(const std::wstring &ws) #endif // BOOST_NO_CWCHAR template<class Archive> -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL text_oarchive_impl<Archive>::text_oarchive_impl( std::ostream & os, unsigned int flags @@ -104,7 +104,7 @@ text_oarchive_impl<Archive>::text_oarchive_impl( } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void text_oarchive_impl<Archive>::save_binary(const void *address, std::size_t count){ put('\n'); this->end_preamble(); diff --git a/boost/archive/impl/text_wiarchive_impl.ipp b/boost/archive/impl/text_wiarchive_impl.ipp index 6938c22659..12af2b9f12 100644 --- a/boost/archive/impl/text_wiarchive_impl.ipp +++ b/boost/archive/impl/text_wiarchive_impl.ipp @@ -29,7 +29,7 @@ namespace archive { // implementation of wiprimtives functions // template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_wiarchive_impl<Archive>::load(char *s) { std::size_t size; @@ -43,7 +43,7 @@ text_wiarchive_impl<Archive>::load(char *s) } template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_wiarchive_impl<Archive>::load(std::string &s) { std::size_t size; @@ -63,7 +63,7 @@ text_wiarchive_impl<Archive>::load(std::string &s) #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_wiarchive_impl<Archive>::load(wchar_t *s) { std::size_t size; @@ -78,7 +78,7 @@ text_wiarchive_impl<Archive>::load(wchar_t *s) #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_wiarchive_impl<Archive>::load(std::wstring &ws) { std::size_t size; @@ -97,7 +97,7 @@ text_wiarchive_impl<Archive>::load(std::wstring &ws) #endif template<class Archive> -BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_WARCHIVE_DECL text_wiarchive_impl<Archive>::text_wiarchive_impl( std::wistream & is, unsigned int flags diff --git a/boost/archive/impl/text_woarchive_impl.ipp b/boost/archive/impl/text_woarchive_impl.ipp index 6683f528c0..2b6d427cd3 100644 --- a/boost/archive/impl/text_woarchive_impl.ipp +++ b/boost/archive/impl/text_woarchive_impl.ipp @@ -31,7 +31,7 @@ namespace archive { // implementation of woarchive functions // template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_woarchive_impl<Archive>::save(const char *s) { // note: superfluous local variable fixes borland warning @@ -43,7 +43,7 @@ text_woarchive_impl<Archive>::save(const char *s) } template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_woarchive_impl<Archive>::save(const std::string &s) { const std::size_t size = s.size(); @@ -56,7 +56,7 @@ text_woarchive_impl<Archive>::save(const std::string &s) #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_woarchive_impl<Archive>::save(const wchar_t *ws) { const std::size_t size = std::wostream::traits_type::length(ws); @@ -68,7 +68,7 @@ text_woarchive_impl<Archive>::save(const wchar_t *ws) #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void text_woarchive_impl<Archive>::save(const std::wstring &ws) { const std::size_t size = ws.length(); diff --git a/boost/archive/impl/xml_iarchive_impl.ipp b/boost/archive/impl/xml_iarchive_impl.ipp index 89e09818d8..7639ecb3b1 100644 --- a/boost/archive/impl/xml_iarchive_impl.ipp +++ b/boost/archive/impl/xml_iarchive_impl.ipp @@ -51,7 +51,7 @@ namespace archive { #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_iarchive_impl<Archive>::load(std::wstring &ws){ std::string s; bool result = gimpl->parse_string(is, s); @@ -85,7 +85,7 @@ xml_iarchive_impl<Archive>::load(std::wstring &ws){ #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_iarchive_impl<Archive>::load(wchar_t * ws){ std::string s; bool result = gimpl->parse_string(is, s); @@ -117,7 +117,7 @@ xml_iarchive_impl<Archive>::load(wchar_t * ws){ #endif // BOOST_NO_CWCHAR template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_iarchive_impl<Archive>::load(std::string &s){ bool result = gimpl->parse_string(is, s); if(! result) @@ -127,7 +127,7 @@ xml_iarchive_impl<Archive>::load(std::string &s){ } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_iarchive_impl<Archive>::load(char * s){ std::string tstring; bool result = gimpl->parse_string(is, tstring); @@ -140,8 +140,8 @@ xml_iarchive_impl<Archive>::load(char * s){ } template<class Archive> -BOOST_ARCHIVE_DECL(void) -xml_iarchive_impl<Archive>::load_override(class_name_type & t, int){ +BOOST_ARCHIVE_DECL void +xml_iarchive_impl<Archive>::load_override(class_name_type & t){ const std::string & s = gimpl->rv.class_name; if(s.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) boost::serialization::throw_exception( @@ -153,7 +153,7 @@ xml_iarchive_impl<Archive>::load_override(class_name_type & t, int){ } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_iarchive_impl<Archive>::init(){ gimpl->init(is); this->set_library_version( @@ -162,7 +162,7 @@ xml_iarchive_impl<Archive>::init(){ } template<class Archive> -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL xml_iarchive_impl<Archive>::xml_iarchive_impl( std::istream &is_, unsigned int flags @@ -179,7 +179,7 @@ xml_iarchive_impl<Archive>::xml_iarchive_impl( } template<class Archive> -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL xml_iarchive_impl<Archive>::~xml_iarchive_impl(){ if(0 == (this->get_flags() & no_header)){ BOOST_TRY{ diff --git a/boost/archive/impl/xml_oarchive_impl.ipp b/boost/archive/impl/xml_oarchive_impl.ipp index ab1a2177bc..9e714f3ca6 100644 --- a/boost/archive/impl/xml_oarchive_impl.ipp +++ b/boost/archive/impl/xml_oarchive_impl.ipp @@ -42,15 +42,15 @@ void save_iterator(std::ostream &os, InputIterator begin, InputIterator end){ boost::archive::iterators::xml_escape<InputIterator> > translator; std::copy( - translator(BOOST_MAKE_PFTO_WRAPPER(begin)), - translator(BOOST_MAKE_PFTO_WRAPPER(end)), + translator(begin), + translator(end), boost::archive::iterators::ostream_iterator<char>(os) ); } #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_oarchive_impl<Archive>::save(const std::wstring & ws){ // at least one library doesn't typedef value_type for strings // so rather than using string directly make a pointer iterator out of it @@ -61,7 +61,7 @@ xml_oarchive_impl<Archive>::save(const std::wstring & ws){ #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_oarchive_impl<Archive>::save(const wchar_t * ws){ save_iterator(os, ws, ws + std::wcslen(ws)); } @@ -70,7 +70,7 @@ xml_oarchive_impl<Archive>::save(const wchar_t * ws){ #endif // BOOST_NO_CWCHAR template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_oarchive_impl<Archive>::save(const std::string & s){ // at least one library doesn't typedef value_type for strings // so rather than using string directly make a pointer iterator out of it @@ -78,27 +78,27 @@ xml_oarchive_impl<Archive>::save(const std::string & s){ const char * > xml_escape_translator; std::copy( - xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s.data())), - xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s.data()+ s.size())), + xml_escape_translator(s.data()), + xml_escape_translator(s.data()+ s.size()), boost::archive::iterators::ostream_iterator<char>(os) ); } template<class Archive> -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL void xml_oarchive_impl<Archive>::save(const char * s){ typedef boost::archive::iterators::xml_escape< const char * > xml_escape_translator; std::copy( - xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s)), - xml_escape_translator(BOOST_MAKE_PFTO_WRAPPER(s + std::strlen(s))), + xml_escape_translator(s), + xml_escape_translator(s + std::strlen(s)), boost::archive::iterators::ostream_iterator<char>(os) ); } template<class Archive> -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL xml_oarchive_impl<Archive>::xml_oarchive_impl( std::ostream & os_, unsigned int flags diff --git a/boost/archive/impl/xml_wiarchive_impl.ipp b/boost/archive/impl/xml_wiarchive_impl.ipp index 257b57590d..a837347edb 100644 --- a/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/boost/archive/impl/xml_wiarchive_impl.ipp @@ -28,7 +28,6 @@ namespace std{ #include <boost/io/ios_state.hpp> #include <boost/core/no_exceptions_support.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/serialization/string.hpp> #include <boost/archive/basic_xml_archive.hpp> @@ -52,10 +51,10 @@ namespace { // anonymous void copy_to_ptr(char * s, const std::wstring & ws){ std::copy( iterators::mb_from_wchar<std::wstring::const_iterator>( - BOOST_MAKE_PFTO_WRAPPER(ws.begin()) + ws.begin() ), iterators::mb_from_wchar<std::wstring::const_iterator>( - BOOST_MAKE_PFTO_WRAPPER(ws.end()) + ws.end() ), s ); @@ -65,7 +64,7 @@ void copy_to_ptr(char * s, const std::wstring & ws){ } // anonymous template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_wiarchive_impl<Archive>::load(std::string & s){ std::wstring ws; bool result = gimpl->parse_string(is, ws); @@ -80,10 +79,10 @@ xml_wiarchive_impl<Archive>::load(std::string & s){ s.reserve(ws.size()); std::copy( iterators::mb_from_wchar<std::wstring::iterator>( - BOOST_MAKE_PFTO_WRAPPER(ws.begin()) + ws.begin() ), iterators::mb_from_wchar<std::wstring::iterator>( - BOOST_MAKE_PFTO_WRAPPER(ws.end()) + ws.end() ), std::back_inserter(s) ); @@ -91,7 +90,7 @@ xml_wiarchive_impl<Archive>::load(std::string & s){ #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_wiarchive_impl<Archive>::load(std::wstring & ws){ bool result = gimpl->parse_string(is, ws); if(! result) @@ -102,7 +101,7 @@ xml_wiarchive_impl<Archive>::load(std::wstring & ws){ #endif template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_wiarchive_impl<Archive>::load(char * s){ std::wstring ws; bool result = gimpl->parse_string(is, ws); @@ -115,7 +114,7 @@ xml_wiarchive_impl<Archive>::load(char * s){ #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_wiarchive_impl<Archive>::load(wchar_t * ws){ std::wstring twstring; bool result = gimpl->parse_string(is, twstring); @@ -129,8 +128,8 @@ xml_wiarchive_impl<Archive>::load(wchar_t * ws){ #endif template<class Archive> -BOOST_WARCHIVE_DECL(void) -xml_wiarchive_impl<Archive>::load_override(class_name_type & t, int){ +BOOST_WARCHIVE_DECL void +xml_wiarchive_impl<Archive>::load_override(class_name_type & t){ const std::wstring & ws = gimpl->rv.class_name; if(ws.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) boost::serialization::throw_exception( @@ -140,7 +139,7 @@ xml_wiarchive_impl<Archive>::load_override(class_name_type & t, int){ } template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_wiarchive_impl<Archive>::init(){ gimpl->init(is); this->set_library_version( @@ -149,7 +148,7 @@ xml_wiarchive_impl<Archive>::init(){ } template<class Archive> -BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_WARCHIVE_DECL xml_wiarchive_impl<Archive>::xml_wiarchive_impl( std::wistream &is_, unsigned int flags @@ -177,7 +176,7 @@ xml_wiarchive_impl<Archive>::xml_wiarchive_impl( } template<class Archive> -BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_WARCHIVE_DECL xml_wiarchive_impl<Archive>::~xml_wiarchive_impl(){ if(0 == (this->get_flags() & no_header)){ BOOST_TRY{ diff --git a/boost/archive/impl/xml_woarchive_impl.ipp b/boost/archive/impl/xml_woarchive_impl.ipp index 1e5139bc40..d5586d51ae 100644 --- a/boost/archive/impl/xml_woarchive_impl.ipp +++ b/boost/archive/impl/xml_woarchive_impl.ipp @@ -52,14 +52,14 @@ void save_iterator(std::wostream &os, InputIterator begin, InputIterator end){ iterators::xml_escape<InputIterator> > xmbtows; std::copy( - xmbtows(BOOST_MAKE_PFTO_WRAPPER(begin)), - xmbtows(BOOST_MAKE_PFTO_WRAPPER(end)), + xmbtows(begin), + xmbtows(end), boost::archive::iterators::ostream_iterator<wchar_t>(os) ); } template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_woarchive_impl<Archive>::save(const std::string & s){ // note: we don't use s.begin() and s.end() because dinkumware // doesn't have string::value_type defined. So use a wrapper @@ -71,47 +71,47 @@ xml_woarchive_impl<Archive>::save(const std::string & s){ #ifndef BOOST_NO_STD_WSTRING template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_woarchive_impl<Archive>::save(const std::wstring & ws){ #if 0 typedef iterators::xml_escape<std::wstring::const_iterator> xmbtows; std::copy( - xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.begin())), - xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.end())), + xmbtows(ws.begin()), + xmbtows(ws.end()), boost::archive::iterators::ostream_iterator<wchar_t>(os) ); #endif typedef iterators::xml_escape<const wchar_t *> xmbtows; std::copy( - xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.data())), - xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws.data() + ws.size())), + xmbtows(ws.data()), + xmbtows(ws.data() + ws.size()), boost::archive::iterators::ostream_iterator<wchar_t>(os) ); } #endif //BOOST_NO_STD_WSTRING template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_woarchive_impl<Archive>::save(const char * s){ save_iterator(os, s, s + std::strlen(s)); } #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<class Archive> -BOOST_WARCHIVE_DECL(void) +BOOST_WARCHIVE_DECL void xml_woarchive_impl<Archive>::save(const wchar_t * ws){ os << ws; typedef iterators::xml_escape<const wchar_t *> xmbtows; std::copy( - xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws)), - xmbtows(BOOST_MAKE_PFTO_WRAPPER(ws + std::wcslen(ws))), + xmbtows(ws), + xmbtows(ws + std::wcslen(ws)), boost::archive::iterators::ostream_iterator<wchar_t>(os) ); } #endif template<class Archive> -BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_WARCHIVE_DECL xml_woarchive_impl<Archive>::xml_woarchive_impl( std::wostream & os_, unsigned int flags @@ -141,7 +141,7 @@ xml_woarchive_impl<Archive>::xml_woarchive_impl( } template<class Archive> -BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_WARCHIVE_DECL xml_woarchive_impl<Archive>::~xml_woarchive_impl(){ } diff --git a/boost/archive/iterators/base64_from_binary.hpp b/boost/archive/iterators/base64_from_binary.hpp index 836d93de35..00c4e10c10 100644 --- a/boost/archive/iterators/base64_from_binary.hpp +++ b/boost/archive/iterators/base64_from_binary.hpp @@ -25,8 +25,6 @@ namespace std{ } // namespace std #endif -#include <boost/serialization/pfto.hpp> - #include <boost/iterator/transform_iterator.hpp> #include <boost/archive/iterators/dataflow_exception.hpp> @@ -88,9 +86,9 @@ class base64_from_binary : public: // make composible buy using templated constructor template<class T> - base64_from_binary(BOOST_PFTO_WRAPPER(T) start) : + base64_from_binary(T start) : super_t( - Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start))), + Base(static_cast< T >(start)), detail::from_6_bit<CharType>() ) {} diff --git a/boost/archive/iterators/binary_from_base64.hpp b/boost/archive/iterators/binary_from_base64.hpp index 9d2c87ebee..2eb7828251 100644 --- a/boost/archive/iterators/binary_from_base64.hpp +++ b/boost/archive/iterators/binary_from_base64.hpp @@ -19,7 +19,6 @@ #include <boost/assert.hpp> #include <boost/serialization/throw_exception.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/static_assert.hpp> #include <boost/iterator/transform_iterator.hpp> @@ -96,9 +95,9 @@ class binary_from_base64 : public public: // make composible buy using templated constructor template<class T> - binary_from_base64(BOOST_PFTO_WRAPPER(T) start) : + binary_from_base64(T start) : super_t( - Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start))), + Base(static_cast< T >(start)), detail::to_6_bit<CharType>() ) {} diff --git a/boost/archive/iterators/insert_linebreaks.hpp b/boost/archive/iterators/insert_linebreaks.hpp index 7fbc79f13a..2504b030db 100644 --- a/boost/archive/iterators/insert_linebreaks.hpp +++ b/boost/archive/iterators/insert_linebreaks.hpp @@ -23,8 +23,6 @@ namespace std{ using ::memcpy; } #endif -#include <boost/serialization/pfto.hpp> - #include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_traits.hpp> @@ -83,8 +81,8 @@ private: public: // make composible buy using templated constructor template<class T> - insert_linebreaks(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + insert_linebreaks(T start) : + super_t(Base(static_cast< T >(start))), m_count(0) {} // intel 7.1 doesn't like default copy constructor diff --git a/boost/archive/iterators/mb_from_wchar.hpp b/boost/archive/iterators/mb_from_wchar.hpp index 04e7c7e9fe..deb798f623 100644 --- a/boost/archive/iterators/mb_from_wchar.hpp +++ b/boost/archive/iterators/mb_from_wchar.hpp @@ -28,7 +28,6 @@ namespace std{ } // namespace std #endif -#include <boost/serialization/pfto.hpp> #include <boost/iterator/iterator_adaptor.hpp> namespace boost { @@ -86,7 +85,7 @@ class mb_from_wchar wchar_t value = * this->base_reference(); #if (defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 3) \ || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION >= 8)))) - m_bend = std::wcrtomb(m_buffer, value, 0); + m_bend = std::wcrtomb(m_buffer, value,0); #else m_bend = std::wctomb(m_buffer, value); #endif @@ -114,8 +113,8 @@ class mb_from_wchar public: // make composible buy using templated constructor template<class T> - mb_from_wchar(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + mb_from_wchar(T start) : + super_t(Base(static_cast< T >(start))), m_bend(0), m_bnext(0), m_full(false) diff --git a/boost/archive/iterators/remove_whitespace.hpp b/boost/archive/iterators/remove_whitespace.hpp index 4383987051..c3580ab258 100644 --- a/boost/archive/iterators/remove_whitespace.hpp +++ b/boost/archive/iterators/remove_whitespace.hpp @@ -18,8 +18,6 @@ #include <boost/assert.hpp> -#include <boost/serialization/pfto.hpp> - #include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/filter_iterator.hpp> #include <boost/iterator/iterator_traits.hpp> @@ -153,8 +151,8 @@ public: // remove_whitespace(){} // why is this needed? // make composible buy using templated constructor template<class T> - remove_whitespace(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))) + remove_whitespace(T start) : + super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor remove_whitespace(const remove_whitespace & rhs) : diff --git a/boost/archive/iterators/transform_width.hpp b/boost/archive/iterators/transform_width.hpp index 15dd8dfc0e..d042560e29 100644 --- a/boost/archive/iterators/transform_width.hpp +++ b/boost/archive/iterators/transform_width.hpp @@ -24,8 +24,6 @@ // character and 8 bit bytes. Lowest common multiple is 24 => 4 6 bit characters // or 3 8 bit characters -#include <boost/serialization/pfto.hpp> - #include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_traits.hpp> @@ -110,8 +108,8 @@ class transform_width : public: // make composible buy using templated constructor template<class T> - transform_width(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + transform_width(T start) : + super_t(Base(static_cast< T >(start))), m_buffer_out_full(false), // To disable GCC warning, but not truly necessary //(m_buffer_in will be initialized later before being @@ -154,7 +152,7 @@ void transform_width<Base, BitsOut, BitsIn, CharType>::fill() { // append these bits to the next output // up to the size of the output - unsigned int i = std::min(missing_bits, m_remaining_bits); + unsigned int i = (std::min)(missing_bits, m_remaining_bits); // shift interesting bits to least significant position base_value_type j = m_buffer_in >> (m_remaining_bits - i); // and mask off the un interesting higher bits diff --git a/boost/archive/iterators/wchar_from_mb.hpp b/boost/archive/iterators/wchar_from_mb.hpp index ab81f17b68..ad1d4cbb7d 100644 --- a/boost/archive/iterators/wchar_from_mb.hpp +++ b/boost/archive/iterators/wchar_from_mb.hpp @@ -30,7 +30,6 @@ namespace std{ #endif #include <boost/serialization/throw_exception.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/iterator/iterator_adaptor.hpp> #include <boost/archive/iterators/dataflow_exception.hpp> @@ -89,8 +88,8 @@ class wchar_from_mb public: // make composible buy using templated constructor template<class T> - wchar_from_mb(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), + wchar_from_mb(T start) : + super_t(Base(static_cast< T >(start))), m_full(false) {} // intel 7.1 doesn't like default copy constructor diff --git a/boost/archive/iterators/xml_escape.hpp b/boost/archive/iterators/xml_escape.hpp index a5d2c5120f..c838a73b86 100644 --- a/boost/archive/iterators/xml_escape.hpp +++ b/boost/archive/iterators/xml_escape.hpp @@ -17,7 +17,6 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <boost/assert.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/iterators/escape.hpp> namespace boost { @@ -40,8 +39,8 @@ public: wchar_t fill(const wchar_t * & bstart, const wchar_t * & bend); template<class T> - xml_escape(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))) + xml_escape(T start) : + super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor xml_escape(const xml_escape & rhs) : diff --git a/boost/archive/iterators/xml_unescape.hpp b/boost/archive/iterators/xml_unescape.hpp index 69438ed044..6997740456 100644 --- a/boost/archive/iterators/xml_unescape.hpp +++ b/boost/archive/iterators/xml_unescape.hpp @@ -19,7 +19,6 @@ #include <boost/assert.hpp> #include <boost/serialization/throw_exception.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/iterators/unescape.hpp> #include <boost/archive/iterators/dataflow_exception.hpp> @@ -54,8 +53,8 @@ public: value_type drain(); template<class T> - xml_unescape(BOOST_PFTO_WRAPPER(T) start) : - super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))) + xml_unescape(T start) : + super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor xml_unescape(const xml_unescape & rhs) : diff --git a/boost/archive/polymorphic_iarchive.hpp b/boost/archive/polymorphic_iarchive.hpp index 50488a331f..7f19410dd8 100644 --- a/boost/archive/polymorphic_iarchive.hpp +++ b/boost/archive/polymorphic_iarchive.hpp @@ -29,7 +29,6 @@ namespace std{ #include <boost/cstdint.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/detail/iserializer.hpp> #include <boost/archive/detail/interface_iarchive.hpp> #include <boost/serialization/nvp.hpp> @@ -44,13 +43,13 @@ namespace serialization { } // namespace serialization namespace archive { namespace detail { - class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; - class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; + class BOOST_ARCHIVE_DECL basic_iarchive; + class BOOST_ARCHIVE_DECL basic_iarchive; } class polymorphic_iarchive; -class polymorphic_iarchive_impl : +class BOOST_SYMBOL_VISIBLE polymorphic_iarchive_impl : public detail::interface_iarchive<polymorphic_iarchive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -98,22 +97,19 @@ public: virtual void load_start(const char * name) = 0; virtual void load_end(const char * name) = 0; virtual void register_basic_serializer(const detail::basic_iserializer & bis) = 0; + virtual detail::helper_collection & get_helper_collection() = 0; // msvc and borland won't automatically pass these to the base class so // make it explicit here template<class T> - void load_override(T & t, BOOST_PFTO int) + void load_override(T & t) { archive::load(* this->This(), t); } // special treatment for name-value pairs. template<class T> void load_override( - #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - const - #endif - boost::serialization::nvp< T > & t, - int + const boost::serialization::nvp< T > & t ){ load_start(t.name()); archive::load(* this->This(), t.value()); @@ -156,7 +152,7 @@ public: namespace boost { namespace archive { -class polymorphic_iarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_iarchive : public polymorphic_iarchive_impl { public: diff --git a/boost/archive/polymorphic_oarchive.hpp b/boost/archive/polymorphic_oarchive.hpp index 1eb9e0b419..aa30b2ac3e 100644 --- a/boost/archive/polymorphic_oarchive.hpp +++ b/boost/archive/polymorphic_oarchive.hpp @@ -28,7 +28,6 @@ namespace std{ #endif #include <boost/cstdint.hpp> -#include <boost/serialization/pfto.hpp> #include <boost/archive/detail/oserializer.hpp> #include <boost/archive/detail/interface_oarchive.hpp> #include <boost/serialization/nvp.hpp> @@ -43,13 +42,13 @@ namespace serialization { } // namespace serialization namespace archive { namespace detail { - class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; - class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; + class BOOST_ARCHIVE_DECL basic_oarchive; + class BOOST_ARCHIVE_DECL basic_oserializer; } class polymorphic_oarchive; -class polymorphic_oarchive_impl : +class BOOST_SYMBOL_VISIBLE polymorphic_oarchive_impl : public detail::interface_oarchive<polymorphic_oarchive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -98,23 +97,21 @@ public: virtual void save_start(const char * name) = 0; virtual void save_end(const char * name) = 0; virtual void register_basic_serializer(const detail::basic_oserializer & bos) = 0; + virtual detail::helper_collection & get_helper_collection() = 0; virtual void end_preamble() = 0; // msvc and borland won't automatically pass these to the base class so // make it explicit here template<class T> - void save_override(T & t, BOOST_PFTO int) + void save_override(T & t) { archive::save(* this->This(), t); } // special treatment for name-value pairs. template<class T> void save_override( - #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - const - #endif - ::boost::serialization::nvp< T > & t, int + const ::boost::serialization::nvp< T > & t ){ save_start(t.name()); archive::save(* this->This(), t.const_value()); @@ -139,7 +136,7 @@ public: }; // note: preserve naming symmetry -class polymorphic_oarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_oarchive : public polymorphic_oarchive_impl { public: diff --git a/boost/archive/text_iarchive.hpp b/boost/archive/text_iarchive.hpp index 1fd0f608d3..e40db8371d 100644 --- a/boost/archive/text_iarchive.hpp +++ b/boost/archive/text_iarchive.hpp @@ -40,7 +40,7 @@ namespace detail { } // namespace detail template<class Archive> -class text_iarchive_impl : +class BOOST_SYMBOL_VISIBLE text_iarchive_impl : public basic_text_iprimitive<std::istream>, public basic_text_iarchive<Archive> { @@ -72,33 +72,30 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(wchar_t * t); #endif - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void 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 !!! - // make this protected so it can be called from a derived archive template<class T> - void load_override(T & t, BOOST_PFTO int){ - basic_text_iarchive<Archive>::load_override(t, 0); + void load_override(T & t){ + basic_text_iarchive<Archive>::load_override(t); } - BOOST_ARCHIVE_DECL(void) - load_override(class_name_type & t, int); - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void + load_override(class_name_type & t); + BOOST_ARCHIVE_DECL void init(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL text_iarchive_impl(std::istream & is, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + //BOOST_ARCHIVE_DECL ~text_iarchive_impl(){}; }; @@ -119,7 +116,7 @@ protected: namespace boost { namespace archive { -class text_iarchive : +class BOOST_SYMBOL_VISIBLE text_iarchive : public text_iarchive_impl<text_iarchive>{ public: text_iarchive(std::istream & is_, unsigned int flags = 0) : diff --git a/boost/archive/text_oarchive.hpp b/boost/archive/text_oarchive.hpp index 9fd63a9b97..7eaea17232 100644 --- a/boost/archive/text_oarchive.hpp +++ b/boost/archive/text_oarchive.hpp @@ -47,7 +47,7 @@ namespace detail { } // namespace detail template<class Archive> -class text_oarchive_impl : +class BOOST_SYMBOL_VISIBLE text_oarchive_impl : /* protected ? */ public basic_text_oprimitive<std::ostream>, public basic_text_oarchive<Archive> { @@ -78,32 +78,32 @@ protected: void save(const boost::serialization::item_version_type & t){ save(static_cast<const unsigned int>(t)); } - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL text_oarchive_impl(std::ostream & os, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + //BOOST_ARCHIVE_DECL ~text_oarchive_impl(){}; public: - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save_binary(const void *address, std::size_t count); }; // do not derive from this class. If you want to extend this functionality // via inhertance, derived from text_oarchive_impl instead. This will // preserve correct static polymorphism. -class text_oarchive : +class BOOST_SYMBOL_VISIBLE text_oarchive : public text_oarchive_impl<text_oarchive> { public: diff --git a/boost/archive/text_wiarchive.hpp b/boost/archive/text_wiarchive.hpp index 5105d351ca..3adf068a51 100644 --- a/boost/archive/text_wiarchive.hpp +++ b/boost/archive/text_wiarchive.hpp @@ -44,7 +44,7 @@ namespace detail { } // namespace detail template<class Archive> -class text_wiarchive_impl : +class BOOST_SYMBOL_VISIBLE text_wiarchive_impl : public basic_text_iprimitive<std::wistream>, public basic_text_iarchive<Archive> { @@ -76,25 +76,23 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(wchar_t * t); #endif - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void 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 !!! template<class T> - void load_override(T & t, BOOST_PFTO int){ - basic_text_iarchive<Archive>::load_override(t, 0); + void load_override(T & t){ + basic_text_iarchive<Archive>::load_override(t); } - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL text_wiarchive_impl(std::wistream & is, unsigned int flags); ~text_wiarchive_impl(){}; }; @@ -116,7 +114,7 @@ protected: namespace boost { namespace archive { -class text_wiarchive : +class BOOST_SYMBOL_VISIBLE text_wiarchive : public text_wiarchive_impl<text_wiarchive>{ public: text_wiarchive(std::wistream & is, unsigned int flags = 0) : diff --git a/boost/archive/text_woarchive.hpp b/boost/archive/text_woarchive.hpp index 2f75204d2f..b6b4f8ed59 100644 --- a/boost/archive/text_woarchive.hpp +++ b/boost/archive/text_woarchive.hpp @@ -52,7 +52,7 @@ namespace detail { } // namespace detail template<class Archive> -class text_woarchive_impl : +class BOOST_SYMBOL_VISIBLE text_woarchive_impl : public basic_text_oprimitive<std::wostream>, public basic_text_oarchive<Archive> { @@ -83,16 +83,16 @@ protected: void save(const boost::serialization::item_version_type & t){ save(static_cast<const unsigned int>(t)); } - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const std::wstring &ws); #endif text_woarchive_impl(std::wostream & os, unsigned int flags) : @@ -129,7 +129,7 @@ public: // do not derive from this class. If you want to extend this functionality // via inhertance, derived from text_oarchive_impl instead. This will // preserve correct static polymorphism. -class text_woarchive : +class BOOST_SYMBOL_VISIBLE text_woarchive : public text_woarchive_impl<text_woarchive> { public: diff --git a/boost/archive/xml_archive_exception.hpp b/boost/archive/xml_archive_exception.hpp index 622cafea41..b07f9a0c33 100644 --- a/boost/archive/xml_archive_exception.hpp +++ b/boost/archive/xml_archive_exception.hpp @@ -20,7 +20,6 @@ #include <boost/assert.hpp> #include <boost/config.hpp> -#include <boost/preprocessor/empty.hpp> #include <boost/archive/detail/decl.hpp> #include <boost/archive/archive_exception.hpp> @@ -32,7 +31,7 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by xml archives // -class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_archive_exception : +class BOOST_SYMBOL_VISIBLE xml_archive_exception : public virtual boost::archive::archive_exception { public: @@ -41,7 +40,7 @@ public: xml_archive_tag_mismatch, xml_archive_tag_name_error } exception_code; - xml_archive_exception( + BOOST_ARCHIVE_DECL xml_archive_exception( exception_code c, const char * e1 = NULL, const char * e2 = NULL diff --git a/boost/archive/xml_iarchive.hpp b/boost/archive/xml_iarchive.hpp index ecaeeebe03..055ba0f426 100644 --- a/boost/archive/xml_iarchive.hpp +++ b/boost/archive/xml_iarchive.hpp @@ -44,7 +44,7 @@ class basic_xml_grammar; typedef basic_xml_grammar<char> xml_grammar; template<class Archive> -class xml_iarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_iarchive_impl : public basic_text_iprimitive<std::istream>, public basic_xml_iarchive<Archive> { @@ -86,29 +86,29 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(wchar_t * t); #endif - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void load(std::wstring &ws); #endif template<class T> - void load_override(T & t, BOOST_PFTO int){ - basic_xml_iarchive<Archive>::load_override(t, 0); + void load_override(T & t){ + basic_xml_iarchive<Archive>::load_override(t); } - BOOST_ARCHIVE_DECL(void) - load_override(class_name_type & t, int); - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void + load_override(class_name_type & t); + BOOST_ARCHIVE_DECL void init(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL xml_iarchive_impl(std::istream & is, unsigned int flags); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL ~xml_iarchive_impl(); }; @@ -128,7 +128,7 @@ protected: namespace boost { namespace archive { -class xml_iarchive : +class BOOST_SYMBOL_VISIBLE xml_iarchive : public xml_iarchive_impl<xml_iarchive>{ public: xml_iarchive(std::istream & is, unsigned int flags = 0) : diff --git a/boost/archive/xml_oarchive.hpp b/boost/archive/xml_oarchive.hpp index 2ac4ae1d69..c5e6da9271 100644 --- a/boost/archive/xml_oarchive.hpp +++ b/boost/archive/xml_oarchive.hpp @@ -47,7 +47,7 @@ namespace detail { } // namespace detail template<class Archive> -class xml_oarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_oarchive_impl : public basic_text_oprimitive<std::ostream>, public basic_xml_oarchive<Archive> { @@ -82,19 +82,19 @@ protected: save(const boost::serialization::item_version_type & t){ save(static_cast<const unsigned int>(t)); } - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL xml_oarchive_impl(std::ostream & os, unsigned int flags); ~xml_oarchive_impl(){} public: @@ -118,7 +118,7 @@ public: // do not derive from this class. If you want to extend this functionality // via inhertance, derived from xml_oarchive_impl instead. This will // preserve correct static polymorphism. -class xml_oarchive : +class BOOST_SYMBOL_VISIBLE xml_oarchive : public xml_oarchive_impl<xml_oarchive> { public: diff --git a/boost/archive/xml_wiarchive.hpp b/boost/archive/xml_wiarchive.hpp index a1baa1f8ab..dbc2d721a4 100644 --- a/boost/archive/xml_wiarchive.hpp +++ b/boost/archive/xml_wiarchive.hpp @@ -58,7 +58,7 @@ class basic_xml_grammar; typedef basic_xml_grammar<wchar_t> xml_wgrammar; template<class Archive> -class xml_wiarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : public basic_text_iprimitive<std::wistream>, public basic_xml_iarchive<Archive> { @@ -99,29 +99,29 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(wchar_t * t); #endif - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void load(std::wstring &ws); #endif template<class T> - void load_override(T & t, BOOST_PFTO int){ - basic_xml_iarchive<Archive>::load_override(t, 0); + void load_override(T & t){ + basic_xml_iarchive<Archive>::load_override(t); } - BOOST_WARCHIVE_DECL(void) - load_override(class_name_type & t, int); - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void + load_override(class_name_type & t); + BOOST_WARCHIVE_DECL void init(); - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL ~xml_wiarchive_impl(); }; @@ -142,7 +142,7 @@ protected: namespace boost { namespace archive { -class xml_wiarchive : +class BOOST_SYMBOL_VISIBLE xml_wiarchive : public xml_wiarchive_impl<xml_wiarchive>{ public: xml_wiarchive(std::wistream & is, unsigned int flags = 0) : diff --git a/boost/archive/xml_woarchive.hpp b/boost/archive/xml_woarchive.hpp index 338bf748b3..62700162d7 100644 --- a/boost/archive/xml_woarchive.hpp +++ b/boost/archive/xml_woarchive.hpp @@ -61,7 +61,7 @@ namespace detail { } // namespace detail template<class Archive> -class xml_woarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_woarchive_impl : public basic_text_oprimitive<std::wostream>, public basic_xml_oarchive<Archive> { @@ -97,21 +97,21 @@ protected: save(const boost::serialization::item_version_type & t){ save(static_cast<const unsigned int>(t)); } - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL xml_woarchive_impl(std::wostream & os, unsigned int flags); - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL ~xml_woarchive_impl(); public: void @@ -135,7 +135,7 @@ public: // do not derive from this class. If you want to extend this functionality // via inhertance, derived from xml_woarchive_impl instead. This will // preserve correct static polymorphism. -class xml_woarchive : +class BOOST_SYMBOL_VISIBLE xml_woarchive : public xml_woarchive_impl<xml_woarchive> { public: |