diff --git a/build/Jamfile b/build/Jamfile index 7e24eb72..1c69d98f 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -66,8 +66,7 @@ template boost_serialization_base common-variant-tag $(BOOST_ROOT) on - <*>"-w-8080 -w-8071 -w-8057 -w-8062" - <*>"-w-8080 -w-8071 -w-8057 -w-8062" + <*>"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-8001 -w-0018 -w-8066" <*>-Gy <*>-Gy BOOST_LIB_DIAGNOSTIC=1 diff --git a/include/boost/archive/basic_archive.hpp b/include/boost/archive/basic_archive.hpp index 81f92724..bbdc0a78 100644 --- a/include/boost/archive/basic_archive.hpp +++ b/include/boost/archive/basic_archive.hpp @@ -97,18 +97,10 @@ enum archive_flags { #define NULL_POINTER_TAG class_id_type(-1) - -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -BOOST_DECL_ARCHIVE -const char * -#endif +BOOST_ARCHIVE_DECL(const char *) ARCHIVE_SIGNATURE(); -unsigned char -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(unsigned char) ARCHIVE_VERSION(); }// namespace archive diff --git a/include/boost/archive/basic_binary_iarchive.hpp b/include/boost/archive/basic_binary_iarchive.hpp index 0b71d20e..d82d3c82 100644 --- a/include/boost/archive/basic_binary_iarchive.hpp +++ b/include/boost/archive/basic_binary_iarchive.hpp @@ -109,11 +109,9 @@ protected: t = (0 != x); } - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_override(class_name_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); basic_binary_iarchive(unsigned int flags) : diff --git a/include/boost/archive/basic_binary_iprimitive.hpp b/include/boost/archive/basic_binary_iprimitive.hpp index 8d406b28..40755edf 100644 --- a/include/boost/archive/basic_binary_iprimitive.hpp +++ b/include/boost/archive/basic_binary_iprimitive.hpp @@ -79,27 +79,22 @@ public: load_binary(& t, sizeof(T)); } - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load(std::wstring &ws); #endif - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load(char * t); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load(wchar_t * t); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_iprimitive(IStream &is_, bool no_codecvt); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_binary_iprimitive(); public: void diff --git a/include/boost/archive/basic_binary_oarchive.hpp b/include/boost/archive/basic_binary_oarchive.hpp index 2601431e..08fba14d 100644 --- a/include/boost/archive/basic_binary_oarchive.hpp +++ b/include/boost/archive/basic_binary_oarchive.hpp @@ -108,8 +108,7 @@ protected: * this->This() << s; } - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); basic_binary_oarchive(unsigned int flags) : diff --git a/include/boost/archive/basic_binary_oprimitive.hpp b/include/boost/archive/basic_binary_oprimitive.hpp index 7197637a..5f2da141 100644 --- a/include/boost/archive/basic_binary_oprimitive.hpp +++ b/include/boost/archive/basic_binary_oprimitive.hpp @@ -77,27 +77,22 @@ public: save_binary(& t, sizeof(T)); } - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const std::wstring &ws); #endif - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const char * t); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save(const wchar_t * t); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_oprimitive(OStream & os, bool no_codecvt); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_binary_oprimitive(); public: void save_binary(const void *address, std::size_t count); diff --git a/include/boost/archive/basic_text_iarchive.hpp b/include/boost/archive/basic_text_iarchive.hpp index 7433fc2c..3cab64c8 100644 --- a/include/boost/archive/basic_text_iarchive.hpp +++ b/include/boost/archive/basic_text_iarchive.hpp @@ -65,12 +65,10 @@ protected: // text file don't include the optional information void load_override(class_id_optional_type & /*t*/, int){} - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_override(class_name_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(void); basic_text_iarchive(unsigned int flags) : diff --git a/include/boost/archive/basic_text_iprimitive.hpp b/include/boost/archive/basic_text_iprimitive.hpp index 146d2308..fe25a2ab 100644 --- a/include/boost/archive/basic_text_iprimitive.hpp +++ b/include/boost/archive/basic_text_iprimitive.hpp @@ -113,13 +113,12 @@ public: t = static_cast(i); } #endif - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_iprimitive(IStream &is, bool no_codecvt); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_text_iprimitive(); public: - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_binary(void *address, std::size_t count); }; diff --git a/include/boost/archive/basic_text_oarchive.hpp b/include/boost/archive/basic_text_oarchive.hpp index 6adb4b41..5cb82f24 100644 --- a/include/boost/archive/basic_text_oarchive.hpp +++ b/include/boost/archive/basic_text_oarchive.hpp @@ -46,7 +46,7 @@ class basic_text_oarchive : public detail::common_oarchive { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ -|| BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x564)) +|| BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x560)) public: #elif defined(BOOST_MSVC) // for some inexplicable reason insertion of "class" generates compile erro @@ -67,8 +67,7 @@ protected: delimiter = eol; } - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) newtoken(); // default processing - invoke serialization library @@ -99,8 +98,7 @@ protected: * this->This() << s; } - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); basic_text_oarchive(unsigned int flags) : diff --git a/include/boost/archive/basic_text_oprimitive.hpp b/include/boost/archive/basic_text_oprimitive.hpp index d603d924..6bc71561 100644 --- a/include/boost/archive/basic_text_oprimitive.hpp +++ b/include/boost/archive/basic_text_oprimitive.hpp @@ -140,13 +140,12 @@ public: os.put(*s++); } - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_oprimitive(OStream & os, bool no_codecvt); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_text_oprimitive(); public: - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_binary(const void *address, std::size_t count); }; diff --git a/include/boost/archive/basic_xml_archive.hpp b/include/boost/archive/basic_xml_archive.hpp index 47a7c886..512315e1 100644 --- a/include/boost/archive/basic_xml_archive.hpp +++ b/include/boost/archive/basic_xml_archive.hpp @@ -62,83 +62,35 @@ public: // constant strings used in xml i/o extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) OBJECT_ID(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) OBJECT_REFERENCE(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) CLASS_ID(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) CLASS_ID_REFERENCE(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) CLASS_NAME(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) TRACKING(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) VERSION(); extern -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) SIGNATURE(); }// namespace archive diff --git a/include/boost/archive/basic_xml_iarchive.hpp b/include/boost/archive/basic_xml_iarchive.hpp index dc899d78..3df2851f 100644 --- a/include/boost/archive/basic_xml_iarchive.hpp +++ b/include/boost/archive/basic_xml_iarchive.hpp @@ -49,11 +49,9 @@ protected: protected: #endif unsigned int depth; - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_start(const char *name); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_end(const char *name); // Anything not an attribute and not a name-value pair is an @@ -91,26 +89,22 @@ protected: // it otherwise it will be loaded as a normal primitive w/o tag and // leaving the archive in an undetermined state void load_override(class_id_optional_type & /* t */, int){} - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_override(object_id_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_override(version_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_override(class_id_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) load_override(tracking_type & t, int); // class_name_type can't be handled here as it depends upon the // char type used by the stream. So require the derived implementation // handle this. // void load_override(class_name_type & t, int); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_xml_iarchive(unsigned int flags); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_xml_iarchive(); }; diff --git a/include/boost/archive/basic_xml_oarchive.hpp b/include/boost/archive/basic_xml_oarchive.hpp index 0a336ac7..66feb097 100644 --- a/include/boost/archive/basic_xml_oarchive.hpp +++ b/include/boost/archive/basic_xml_oarchive.hpp @@ -51,34 +51,27 @@ protected: unsigned int depth; bool indent_next; bool pending_preamble; - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) indent(); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) init(); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) write_attribute( const char *attribute_name, int t, const char *conjunction = "=\"" ); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) write_attribute( const char *attribute_name, const char *key ); // helpers used below - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_start(const char *name); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_end(const char *name); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) end_preamble(); // Anything not an attribute and not a name-value pair is an @@ -108,34 +101,26 @@ protected: // specific overrides for attributes - not name value pairs so we // want to trap them before the above "fall through" - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const object_id_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const object_reference_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const version_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const class_id_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const class_id_optional_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const class_id_reference_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const class_name_type & t, int); - void - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) save_override(const tracking_type & t, int); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_xml_oarchive(unsigned int flags); - BOOST_DECL_ARCHIVE_OR_WARCHIVE + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_xml_oarchive(); }; diff --git a/include/boost/archive/detail/archive_pointer_iserializer.hpp b/include/boost/archive/detail/archive_pointer_iserializer.hpp index 3c9bad00..72d45a5f 100644 --- a/include/boost/archive/detail/archive_pointer_iserializer.hpp +++ b/include/boost/archive/detail/archive_pointer_iserializer.hpp @@ -38,7 +38,7 @@ template class archive_pointer_iserializer : public basic_pointer_iserializer { protected: - explicit BOOST_DECL_ARCHIVE_OR_WARCHIVE + explicit BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) archive_pointer_iserializer( const boost::serialization::extended_type_info & type_ ); @@ -70,13 +70,8 @@ public: // type_info. returns NULL if there is no such instance. This // would indicate that the no object of the specified type was loaded // any where in the code. - #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE_OR_WARCHIVE - static const basic_pointer_iserializer * - #else - static const basic_pointer_iserializer * - BOOST_DECL_ARCHIVE_OR_WARCHIVE - #endif + static + BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_iserializer *) find( const boost::serialization::extended_type_info & type_ ); diff --git a/include/boost/archive/detail/archive_pointer_oserializer.hpp b/include/boost/archive/detail/archive_pointer_oserializer.hpp index 7b29eeef..dda719c9 100644 --- a/include/boost/archive/detail/archive_pointer_oserializer.hpp +++ b/include/boost/archive/detail/archive_pointer_oserializer.hpp @@ -35,7 +35,7 @@ template class archive_pointer_oserializer : public basic_pointer_oserializer { protected: - explicit BOOST_DECL_ARCHIVE_OR_WARCHIVE + explicit BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) archive_pointer_oserializer( const boost::serialization::extended_type_info & type_ ); @@ -44,13 +44,8 @@ public: // type_info. returns NULL, if there is no such instance. This // would indicate that the no object of the specified type was saved // any where in the code. - #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE_OR_WARCHIVE - static const basic_pointer_oserializer * - #else - static const basic_pointer_oserializer * - BOOST_DECL_ARCHIVE_OR_WARCHIVE - #endif + static + BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_oserializer *) find( const boost::serialization::extended_type_info & type_ ); diff --git a/include/boost/archive/detail/basic_archive_impl.hpp b/include/boost/archive/detail/basic_archive_impl.hpp index e79fa012..8c39ba89 100644 --- a/include/boost/archive/detail/basic_archive_impl.hpp +++ b/include/boost/archive/detail/basic_archive_impl.hpp @@ -34,7 +34,7 @@ namespace detail { ////////////////////////////////////////////////////////////////////// // class basic_iarchive - read serialized objects from a input stream -class BOOST_DECL_ARCHIVE basic_archive_impl +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_archive_impl { ////////////////////////////////////////////////////////////////////// // list of serialization helpers diff --git a/include/boost/archive/detail/basic_iarchive.hpp b/include/boost/archive/detail/basic_iarchive.hpp index 2c5c4f9a..43669e71 100644 --- a/include/boost/archive/detail/basic_iarchive.hpp +++ b/include/boost/archive/detail/basic_iarchive.hpp @@ -36,11 +36,11 @@ namespace archive { namespace detail { class basic_iarchive_impl; -class BOOST_DECL_ARCHIVE basic_iserializer; -class BOOST_DECL_ARCHIVE basic_pointer_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; ////////////////////////////////////////////////////////////////////// // class basic_iarchive - read serialized objects from a input stream -class BOOST_DECL_ARCHIVE basic_iarchive +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive { friend class basic_iarchive_impl; // hide implementation of this class to minimize header conclusion diff --git a/include/boost/archive/detail/basic_iserializer.hpp b/include/boost/archive/detail/basic_iserializer.hpp index aaf1fafd..ed49d6f3 100644 --- a/include/boost/archive/detail/basic_iserializer.hpp +++ b/include/boost/archive/detail/basic_iserializer.hpp @@ -33,10 +33,11 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_iarchive; -class BOOST_DECL_ARCHIVE basic_pointer_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; -class BOOST_DECL_ARCHIVE basic_iserializer : public basic_serializer +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer : + public basic_serializer { private: basic_pointer_iserializer *bpis; diff --git a/include/boost/archive/detail/basic_oarchive.hpp b/include/boost/archive/detail/basic_oarchive.hpp index 155f6646..a99123c7 100644 --- a/include/boost/archive/detail/basic_oarchive.hpp +++ b/include/boost/archive/detail/basic_oarchive.hpp @@ -38,12 +38,12 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_oarchive_impl; -class BOOST_DECL_ARCHIVE basic_oserializer; -class BOOST_DECL_ARCHIVE basic_pointer_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive_impl; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; ////////////////////////////////////////////////////////////////////// // class basic_oarchive - write serialized objects to an output stream -class BOOST_DECL_ARCHIVE_OR_WARCHIVE basic_oarchive +class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive { friend class basic_oarchive_impl; // hide implementation of this class to minimize header conclusion diff --git a/include/boost/archive/detail/basic_oserializer.hpp b/include/boost/archive/detail/basic_oserializer.hpp index 93bd6c56..01e334e3 100644 --- a/include/boost/archive/detail/basic_oserializer.hpp +++ b/include/boost/archive/detail/basic_oserializer.hpp @@ -32,10 +32,10 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_oarchive; -class BOOST_DECL_ARCHIVE basic_pointer_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; -class BOOST_DECL_ARCHIVE basic_oserializer : +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer : public basic_serializer { private: diff --git a/include/boost/archive/detail/basic_pointer_iserializer.hpp b/include/boost/archive/detail/basic_pointer_iserializer.hpp index e9237270..172d9158 100644 --- a/include/boost/archive/detail/basic_pointer_iserializer.hpp +++ b/include/boost/archive/detail/basic_pointer_iserializer.hpp @@ -32,10 +32,10 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_iarchive; -class BOOST_DECL_ARCHIVE basic_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; -class BOOST_DECL_ARCHIVE basic_pointer_iserializer +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer : public basic_serializer { protected: explicit basic_pointer_iserializer( diff --git a/include/boost/archive/detail/basic_pointer_oserializer.hpp b/include/boost/archive/detail/basic_pointer_oserializer.hpp index fb92abbd..f0533886 100644 --- a/include/boost/archive/detail/basic_pointer_oserializer.hpp +++ b/include/boost/archive/detail/basic_pointer_oserializer.hpp @@ -31,10 +31,10 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_oarchive; -class BOOST_DECL_ARCHIVE basic_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; -class BOOST_DECL_ARCHIVE basic_pointer_oserializer : +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer : public basic_serializer { protected: explicit basic_pointer_oserializer( diff --git a/include/boost/archive/detail/basic_serializer_map.hpp b/include/boost/archive/detail/basic_serializer_map.hpp index c88da6ed..96508f02 100644 --- a/include/boost/archive/detail/basic_serializer_map.hpp +++ b/include/boost/archive/detail/basic_serializer_map.hpp @@ -31,7 +31,7 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_serializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer; struct type_info_pointer_compare { @@ -42,7 +42,7 @@ struct type_info_pointer_compare } }; -struct BOOST_DECL_ARCHIVE basic_serializer_map +struct BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer_map { typedef std::set map_type; map_type map; diff --git a/include/boost/archive/detail/decl.hpp b/include/boost/archive/detail/decl.hpp index dcc4261b..d30e71b3 100644 --- a/include/boost/archive/detail/decl.hpp +++ b/include/boost/archive/detail/decl.hpp @@ -1,12 +1,12 @@ #ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP -#define BOOST_ARCHIVE_DETAIL_DECL_HPP +#define BOOST_ARCHIVE_DETAIL_DECL_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once -#endif +#endif -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8 // decl.hpp // // © Copyright Robert Ramey 2004 @@ -22,48 +22,58 @@ // http://www.boost.org/more/separate_compilation.html #include +#include -#if defined(BOOST_HAS_DECLSPEC) \ -&& (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)) - -#if defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_DECL_ARCHIVE __declspec(dllexport) - #pragma message( "BOOST_DECL_ARCHIVE __declspec(dllexport)" ) - #define BOOST_DECL_ARCHIVE_OR_WARCHIVE __declspec(dllexport) - #pragma message( "BOOST_DECL_ARCHIVE_OR_WARCHIVE __declspec(dllexport)" ) -#elif defined(BOOST_WARCHIVE_SOURCE) - #define BOOST_DECL_WARCHIVE __declspec(dllexport) - #pragma message( "BOOST_DECL_WARCHIVE __declspec(dllexport)" ) - #define BOOST_DECL_ARCHIVE_OR_WARCHIVE __declspec(dllexport) - #pragma message( "BOOST_DECL_ARCHIVE_OR_WARCHIVE __declspec(dllexport)" ) -#endif - -#if !defined(BOOST_DECL_ARCHIVE) && !defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_DECL_ARCHIVE __declspec(dllimport) - #pragma message( "BOOST_DECL_ARCHIVE __declspec(dllimport)" ) -#endif -#if !defined(BOOST_DECL_WARCHIVE) && !defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_DECL_WARCHIVE __declspec(dllimport) - #pragma message( "BOOST_DECL_WARCHIVE __declspec(dllimport)" ) -#endif -#if !defined(BOOST_DECL_ARCHIVE_OR_WARCHIVE) \ -&& !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) - #define BOOST_DECL_ARCHIVE_OR_WARCHIVE __declspec(dllimport) - #pragma message( "BOOST_DECL_WARCHIVE_OR_WARCHIVE __declspec(dllimport)" ) -#endif -// and reinitialize include guard so in case another archive header is -// included. -#if defined(BOOST_ARCHIVE_DETAIL_UNDECL_HPP) - #undef BOOST_ARCHIVE_DETAIL_UNDECL_HPP -#endif - -#else // BOOST_HAS_DECLSPEC && ... - - #define BOOST_DECL_ARCHIVE - #define BOOST_DECL_WARCHIVE - #define BOOST_DECL_ARCHIVE_OR_WARCHIVE - +#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 + #endif #endif // BOOST_HAS_DECLSPEC +#if ! defined(BOOST_ARCHIVE_DECL) + #define BOOST_ARCHIVE_DECL(T) T +#endif +#if ! defined(BOOST_WARCHIVE_DECL) + #define BOOST_WARCHIVE_DECL(T) T +#endif +#if ! defined(BOOST_ARCHIVE_OR_WARCHIVE_DECL) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T +#endif #endif // BOOST_ARCHIVE_DETAIL_DECL_HPP diff --git a/include/boost/archive/detail/interface_iarchive.hpp b/include/boost/archive/detail/interface_iarchive.hpp index b5d844ec..50069a45 100644 --- a/include/boost/archive/detail/interface_iarchive.hpp +++ b/include/boost/archive/detail/interface_iarchive.hpp @@ -31,7 +31,7 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_pointer_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; template class interface_iarchive diff --git a/include/boost/archive/detail/interface_oarchive.hpp b/include/boost/archive/detail/interface_oarchive.hpp index 1390699f..2c23fb78 100644 --- a/include/boost/archive/detail/interface_oarchive.hpp +++ b/include/boost/archive/detail/interface_oarchive.hpp @@ -31,7 +31,7 @@ namespace serialization { namespace archive { namespace detail { -class BOOST_DECL_ARCHIVE basic_pointer_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; template class interface_oarchive diff --git a/include/boost/archive/detail/iserializer.hpp b/include/boost/archive/detail/iserializer.hpp index 319d6c52..0e653e43 100644 --- a/include/boost/archive/detail/iserializer.hpp +++ b/include/boost/archive/detail/iserializer.hpp @@ -547,7 +547,7 @@ inline void load(Archive &ar, T &t){ } // BORLAND -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) // borland has a couple fo problems // a) if function is partiall specialized - see below // const paramters are transformed to non-const ones diff --git a/include/boost/archive/detail/polymorphic_iarchive_impl.hpp b/include/boost/archive/detail/polymorphic_iarchive_impl.hpp index a02beecf..f7b5101a 100644 --- a/include/boost/archive/detail/polymorphic_iarchive_impl.hpp +++ b/include/boost/archive/detail/polymorphic_iarchive_impl.hpp @@ -36,8 +36,8 @@ namespace boost { namespace archive { namespace detail{ -class BOOST_DECL_ARCHIVE basic_iserializer; -class BOOST_DECL_ARCHIVE basic_pointer_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; template class polymorphic_iarchive_impl : diff --git a/include/boost/archive/detail/polymorphic_oarchive_impl.hpp b/include/boost/archive/detail/polymorphic_oarchive_impl.hpp index 2b9c52fb..19aa5411 100644 --- a/include/boost/archive/detail/polymorphic_oarchive_impl.hpp +++ b/include/boost/archive/detail/polymorphic_oarchive_impl.hpp @@ -36,8 +36,8 @@ namespace boost { namespace archive { namespace detail{ -class BOOST_DECL_ARCHIVE basic_oserializer; -class BOOST_DECL_ARCHIVE basic_pointer_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; template class polymorphic_oarchive_impl : diff --git a/include/boost/archive/impl/archive_pointer_iserializer.ipp b/include/boost/archive/impl/archive_pointer_iserializer.ipp index 9161bc30..f79ee7d3 100644 --- a/include/boost/archive/impl/archive_pointer_iserializer.ipp +++ b/include/boost/archive/impl/archive_pointer_iserializer.ipp @@ -24,9 +24,7 @@ basic_serializer_map & iserializer_map(){ } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) archive_pointer_iserializer::archive_pointer_iserializer( const boost::serialization::extended_type_info & type ) : @@ -36,17 +34,7 @@ archive_pointer_iserializer::archive_pointer_iserializer( } template -#if !defined(__BORLANDC__) - #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE_OR_WARCHIVE - const basic_pointer_iserializer * - #else - const basic_pointer_iserializer * - BOOST_DECL_ARCHIVE_OR_WARCHIVE - #endif -#else - const basic_pointer_iserializer * -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_iserializer *) archive_pointer_iserializer::find( const boost::serialization::extended_type_info & type ){ diff --git a/include/boost/archive/impl/archive_pointer_oserializer.ipp b/include/boost/archive/impl/archive_pointer_oserializer.ipp index e99a9823..266e78e4 100644 --- a/include/boost/archive/impl/archive_pointer_oserializer.ipp +++ b/include/boost/archive/impl/archive_pointer_oserializer.ipp @@ -25,9 +25,7 @@ oserializer_map(){ } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) archive_pointer_oserializer::archive_pointer_oserializer( const boost::serialization::extended_type_info & type ) : @@ -37,17 +35,7 @@ archive_pointer_oserializer::archive_pointer_oserializer( } template -#if !defined(__BORLANDC__) - #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE_OR_WARCHIVE - const basic_pointer_oserializer * - #else - const basic_pointer_oserializer * - BOOST_DECL_ARCHIVE_OR_WARCHIVE - #endif -#else - const basic_pointer_oserializer * -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_oserializer *) archive_pointer_oserializer::find( const boost::serialization::extended_type_info & type ){ diff --git a/include/boost/archive/impl/basic_binary_iarchive.ipp b/include/boost/archive/impl/basic_binary_iarchive.ipp index 61655b8e..a5869822 100644 --- a/include/boost/archive/impl/basic_binary_iarchive.ipp +++ b/include/boost/archive/impl/basic_binary_iarchive.ipp @@ -29,10 +29,7 @@ namespace archive { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // implementation of binary_binary_archive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iarchive::load_override(class_name_type & t, int){ std::string cn; cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); @@ -47,10 +44,7 @@ basic_binary_iarchive::load_override(class_name_type & t, int){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iarchive::init(){ // read signature in an archive version independent manner std::string file_signature; diff --git a/include/boost/archive/impl/basic_binary_iprimitive.ipp b/include/boost/archive/impl/basic_binary_iprimitive.ipp index b36649e1..42e9a02a 100644 --- a/include/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/include/boost/archive/impl/basic_binary_iprimitive.ipp @@ -36,10 +36,7 @@ namespace archive { // implementation of basic_binary_iprimitive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iprimitive::init() { // Detect attempts to pass native binary archives across @@ -77,10 +74,7 @@ basic_binary_iprimitive::init() } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iprimitive::load(wchar_t * ws) { std::size_t l; @@ -90,10 +84,7 @@ basic_binary_iprimitive::load(wchar_t * ws) } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iprimitive::load(std::string & s) { std::size_t l; @@ -109,10 +100,7 @@ basic_binary_iprimitive::load(std::string & s) #ifndef BOOST_NO_CWCHAR template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iprimitive::load(char * s) { std::size_t l; @@ -124,10 +112,7 @@ basic_binary_iprimitive::load(char * s) #ifndef BOOST_NO_STD_WSTRING template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iprimitive::load(std::wstring & ws) { std::size_t l; @@ -143,9 +128,7 @@ basic_binary_iprimitive::load(std::wstring & ws) #endif template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_iprimitive::basic_binary_iprimitive( IStream &is_, bool no_codecvt @@ -168,9 +151,7 @@ basic_binary_iprimitive::basic_binary_iprimitive( // scoped_ptr requires that archive_locale be a complete type at time of // destruction so define destructor here rather than in the header template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_iprimitive::~basic_binary_iprimitive(){ } diff --git a/include/boost/archive/impl/basic_binary_oarchive.ipp b/include/boost/archive/impl/basic_binary_oarchive.ipp index 5ffaa739..e0137c6f 100644 --- a/include/boost/archive/impl/basic_binary_oarchive.ipp +++ b/include/boost/archive/impl/basic_binary_oarchive.ipp @@ -28,9 +28,10 @@ namespace archive { // implementation of binary_binary_oarchive template -void #if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +#else +void #endif basic_binary_oarchive::init(){ // write signature in an archive version independent manner diff --git a/include/boost/archive/impl/basic_binary_oprimitive.ipp b/include/boost/archive/impl/basic_binary_oprimitive.ipp index 48f1287c..05d5f813 100644 --- a/include/boost/archive/impl/basic_binary_oprimitive.ipp +++ b/include/boost/archive/impl/basic_binary_oprimitive.ipp @@ -39,10 +39,7 @@ namespace archive { // implementation of basic_binary_oprimitive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_oprimitive::init() { // record native sizes of fundamental types @@ -58,10 +55,7 @@ basic_binary_oprimitive::init() } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_oprimitive::save(const char * s) { std::size_t l = std::strlen(s); @@ -70,10 +64,7 @@ basic_binary_oprimitive::save(const char * s) } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_oprimitive::save(const std::string &s) { std::size_t l = static_cast(s.size()); @@ -83,10 +74,7 @@ basic_binary_oprimitive::save(const std::string &s) #ifndef BOOST_NO_CWCHAR template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_oprimitive::save(const wchar_t * ws) { std::size_t l = std::wcslen(ws); @@ -96,10 +84,7 @@ basic_binary_oprimitive::save(const wchar_t * ws) #ifndef BOOST_NO_STD_WSTRING template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_oprimitive::save(const std::wstring &ws) { std::size_t l = ws.size(); @@ -110,9 +95,7 @@ basic_binary_oprimitive::save(const std::wstring &ws) #endif template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_oprimitive::basic_binary_oprimitive( OStream &os_, bool no_codecvt @@ -135,10 +118,7 @@ basic_binary_oprimitive::basic_binary_oprimitive( // scoped_ptr requires that g be a complete type at time of // destruction so define destructor here rather than in the header template - -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_binary_oprimitive::~basic_binary_oprimitive(){ BOOST_TRY { os.flush(); diff --git a/include/boost/archive/impl/basic_text_iarchive.ipp b/include/boost/archive/impl/basic_text_iarchive.ipp index 4faeaeeb..7b31861d 100644 --- a/include/boost/archive/impl/basic_text_iarchive.ipp +++ b/include/boost/archive/impl/basic_text_iarchive.ipp @@ -29,10 +29,7 @@ namespace archive { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // implementation of text_text_archive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_text_iarchive::load_override(class_name_type & t, int){ std::string cn; cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); @@ -47,10 +44,7 @@ basic_text_iarchive::load_override(class_name_type & t, int){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_text_iarchive::init(void){ // read signature in an archive version independent manner std::string file_signature; diff --git a/include/boost/archive/impl/basic_text_iprimitive.ipp b/include/boost/archive/impl/basic_text_iprimitive.ipp index d46727ad..44116306 100644 --- a/include/boost/archive/impl/basic_text_iprimitive.ipp +++ b/include/boost/archive/impl/basic_text_iprimitive.ipp @@ -35,10 +35,7 @@ namespace archive { // translate base64 text into binary and copy into buffer // until buffer is full. template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_text_iprimitive::load_binary( void *address, std::size_t count @@ -93,9 +90,7 @@ basic_text_iprimitive::load_binary( } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_iprimitive::basic_text_iprimitive( IStream &is_, bool no_codecvt @@ -119,9 +114,7 @@ basic_text_iprimitive::basic_text_iprimitive( } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_iprimitive::~basic_text_iprimitive(){ } diff --git a/include/boost/archive/impl/basic_text_oarchive.ipp b/include/boost/archive/impl/basic_text_oarchive.ipp index b3f69ac0..85940c64 100644 --- a/include/boost/archive/impl/basic_text_oarchive.ipp +++ b/include/boost/archive/impl/basic_text_oarchive.ipp @@ -27,10 +27,7 @@ namespace archive { // implementation of basic_text_oarchive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_text_oarchive::newtoken() { switch(delimiter){ @@ -51,10 +48,7 @@ basic_text_oarchive::newtoken() } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_text_oarchive::init(){ // write signature in an archive version independent manner const std::string file_signature(ARCHIVE_SIGNATURE()); diff --git a/include/boost/archive/impl/basic_text_oprimitive.ipp b/include/boost/archive/impl/basic_text_oprimitive.ipp index a614365e..6237ceed 100644 --- a/include/boost/archive/impl/basic_text_oprimitive.ipp +++ b/include/boost/archive/impl/basic_text_oprimitive.ipp @@ -25,10 +25,7 @@ namespace archive { // translate to base64 and copy in to buffer. template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_text_oprimitive::save_binary( const void *address, std::size_t count @@ -74,9 +71,7 @@ basic_text_oprimitive::save_binary( } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_oprimitive::basic_text_oprimitive( OStream & os_, bool no_codecvt @@ -100,9 +95,7 @@ basic_text_oprimitive::basic_text_oprimitive( } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_oprimitive::~basic_text_oprimitive(){ BOOST_TRY{ os.flush(); diff --git a/include/boost/archive/impl/basic_xml_iarchive.ipp b/include/boost/archive/impl/basic_xml_iarchive.ipp index a689320b..c152189e 100644 --- a/include/boost/archive/impl/basic_xml_iarchive.ipp +++ b/include/boost/archive/impl/basic_xml_iarchive.ipp @@ -23,10 +23,7 @@ namespace archive { // implementation of xml_text_archive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_iarchive::load_start(const char *name){ // if there's no name if(NULL == name) @@ -43,10 +40,7 @@ basic_xml_iarchive::load_start(const char *name){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_iarchive::load_end(const char *name){ // if there's no name if(NULL == name) @@ -79,53 +73,37 @@ basic_xml_iarchive::load_end(const char *name){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_iarchive::load_override(object_id_type & t, int){ t = this->This()->gimpl->rv.object_id; } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_iarchive::load_override(version_type & t, int){ t = this->This()->gimpl->rv.version; } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_iarchive::load_override(class_id_type & t, int){ t = this->This()->gimpl->rv.class_id; } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_iarchive::load_override(tracking_type & t, int){ t = this->This()->gimpl->rv.tracking_level; } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_xml_iarchive::basic_xml_iarchive(unsigned int flags) : detail::common_iarchive(flags), depth(0) {} template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_xml_iarchive::~basic_xml_iarchive(){} } // namespace archive diff --git a/include/boost/archive/impl/basic_xml_oarchive.ipp b/include/boost/archive/impl/basic_xml_oarchive.ipp index 2eef6dcf..e7fdc3f6 100644 --- a/include/boost/archive/impl/basic_xml_oarchive.ipp +++ b/include/boost/archive/impl/basic_xml_oarchive.ipp @@ -57,10 +57,7 @@ struct XML_name { // implemenations of functions common to both types of xml output template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::write_attribute( const char *attribute_name, int t, @@ -74,10 +71,7 @@ basic_xml_oarchive::write_attribute( } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::write_attribute( const char *attribute_name, const char *key @@ -90,10 +84,7 @@ basic_xml_oarchive::write_attribute( } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::indent(){ int i; for(i = depth; i-- > 0;) @@ -101,10 +92,7 @@ basic_xml_oarchive::indent(){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_start(const char *name) { if(NULL == name) @@ -126,10 +114,7 @@ basic_xml_oarchive::save_start(const char *name) } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_end(const char *name) { if(NULL == name) @@ -153,10 +138,7 @@ basic_xml_oarchive::save_end(const char *name) } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::end_preamble(){ if(pending_preamble){ this->This()->put('>'); @@ -165,20 +147,14 @@ basic_xml_oarchive::end_preamble(){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override(const object_id_type & t, int) { int i = t.t; // extra .t is for borland write_attribute(OBJECT_ID(), i, "=\"_"); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override( const object_reference_type & t, int @@ -187,29 +163,20 @@ basic_xml_oarchive::save_override( write_attribute(OBJECT_REFERENCE(), i, "=\"_"); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override(const version_type & t, int) { int i = t.t; // extra .t is for borland write_attribute(VERSION(), i); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override(const class_id_type & t, int) { write_attribute(CLASS_ID(), t); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override( const class_id_reference_type & t, int @@ -217,10 +184,7 @@ basic_xml_oarchive::save_override( write_attribute(CLASS_ID_REFERENCE(), t); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override( const class_id_optional_type & t, int @@ -228,10 +192,7 @@ basic_xml_oarchive::save_override( write_attribute(CLASS_ID(), t); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override(const class_name_type & t, int) { const char * key = t; @@ -240,20 +201,14 @@ basic_xml_oarchive::save_override(const class_name_type & t, int) write_attribute(CLASS_NAME(), key); } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::save_override(const tracking_type & t, int) { write_attribute(TRACKING(), t.t); // extra .t is for borland } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_xml_oarchive::init(){ // xml header this->This()->put("\n"); @@ -266,9 +221,7 @@ basic_xml_oarchive::init(){ } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_xml_oarchive::basic_xml_oarchive(unsigned int flags) : detail::common_oarchive(flags), depth(0), @@ -278,9 +231,7 @@ basic_xml_oarchive::basic_xml_oarchive(unsigned int flags) : } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE_OR_WARCHIVE -#endif +BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_xml_oarchive::~basic_xml_oarchive(){ if(0 == (this->get_flags() & no_header)){ BOOST_TRY{ diff --git a/include/boost/archive/impl/text_iarchive_impl.ipp b/include/boost/archive/impl/text_iarchive_impl.ipp index 5fe8fb80..98e2e969 100644 --- a/include/boost/archive/impl/text_iarchive_impl.ipp +++ b/include/boost/archive/impl/text_iarchive_impl.ipp @@ -28,10 +28,7 @@ namespace boost { namespace archive { template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_iarchive_impl::load(char *s) { std::size_t size; @@ -44,10 +41,7 @@ text_iarchive_impl::load(char *s) } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_iarchive_impl::load(std::string &s) { std::size_t size; @@ -65,10 +59,7 @@ text_iarchive_impl::load(std::string &s) #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_iarchive_impl::load(wchar_t *ws) { std::size_t size; @@ -82,10 +73,7 @@ text_iarchive_impl::load(wchar_t *ws) #ifndef BOOST_NO_STD_WSTRING template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_iarchive_impl::load(std::wstring &ws) { std::size_t size; @@ -104,9 +92,7 @@ text_iarchive_impl::load(std::wstring &ws) #endif // BOOST_NO_CWCHAR template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_iarchive_impl::text_iarchive_impl( std::istream & is, unsigned int flags diff --git a/include/boost/archive/impl/text_oarchive_impl.ipp b/include/boost/archive/impl/text_oarchive_impl.ipp index b0dca15d..2df0b460 100644 --- a/include/boost/archive/impl/text_oarchive_impl.ipp +++ b/include/boost/archive/impl/text_oarchive_impl.ipp @@ -38,10 +38,7 @@ namespace archive { // of template parameters used to create a text_oprimitive template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_oarchive_impl::save(const char * s) { const std::size_t len = std::ostream::traits_type::length(s); @@ -51,10 +48,7 @@ text_oarchive_impl::save(const char * s) } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_oarchive_impl::save(const std::string &s) { const std::size_t size = s.size(); @@ -66,10 +60,7 @@ text_oarchive_impl::save(const std::string &s) #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_oarchive_impl::save(const wchar_t * ws) { const std::size_t l = std::wcslen(ws); @@ -81,10 +72,7 @@ text_oarchive_impl::save(const wchar_t * ws) #ifndef BOOST_NO_STD_WSTRING template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_oarchive_impl::save(const std::wstring &ws) { const std::size_t l = ws.size(); @@ -96,9 +84,7 @@ text_oarchive_impl::save(const std::wstring &ws) #endif // BOOST_NO_CWCHAR template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_oarchive_impl::text_oarchive_impl( std::ostream & os, unsigned int flags @@ -118,10 +104,7 @@ text_oarchive_impl::text_oarchive_impl( } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) text_oarchive_impl::save_binary(const void *address, std::size_t count){ put('\n'); this->end_preamble(); diff --git a/include/boost/archive/impl/text_wiarchive_impl.ipp b/include/boost/archive/impl/text_wiarchive_impl.ipp index c0aa5e12..e838db04 100644 --- a/include/boost/archive/impl/text_wiarchive_impl.ipp +++ b/include/boost/archive/impl/text_wiarchive_impl.ipp @@ -29,8 +29,7 @@ namespace archive { // implementation of wiprimtives functions // template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_wiarchive_impl::load(char *s) { std::size_t size; @@ -44,8 +43,7 @@ text_wiarchive_impl::load(char *s) } template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_wiarchive_impl::load(std::string &s) { std::size_t size; @@ -65,8 +63,7 @@ text_wiarchive_impl::load(std::string &s) #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_wiarchive_impl::load(wchar_t *s) { std::size_t size; @@ -81,8 +78,7 @@ text_wiarchive_impl::load(wchar_t *s) #ifndef BOOST_NO_STD_WSTRING template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_wiarchive_impl::load(std::wstring &ws) { std::size_t size; @@ -101,9 +97,7 @@ text_wiarchive_impl::load(std::wstring &ws) #endif template -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) text_wiarchive_impl::text_wiarchive_impl( std::wistream & is, unsigned int flags diff --git a/include/boost/archive/impl/text_woarchive_impl.ipp b/include/boost/archive/impl/text_woarchive_impl.ipp index 5a5e83dd..6683f528 100644 --- a/include/boost/archive/impl/text_woarchive_impl.ipp +++ b/include/boost/archive/impl/text_woarchive_impl.ipp @@ -31,8 +31,7 @@ namespace archive { // implementation of woarchive functions // template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_woarchive_impl::save(const char *s) { // note: superfluous local variable fixes borland warning @@ -44,8 +43,7 @@ text_woarchive_impl::save(const char *s) } template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_woarchive_impl::save(const std::string &s) { const std::size_t size = s.size(); @@ -58,8 +56,7 @@ text_woarchive_impl::save(const std::string &s) #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_woarchive_impl::save(const wchar_t *ws) { const std::size_t size = std::wostream::traits_type::length(ws); @@ -71,8 +68,7 @@ text_woarchive_impl::save(const wchar_t *ws) #ifndef BOOST_NO_STD_WSTRING template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) text_woarchive_impl::save(const std::wstring &ws) { const std::size_t size = ws.length(); diff --git a/include/boost/archive/impl/xml_iarchive_impl.ipp b/include/boost/archive/impl/xml_iarchive_impl.ipp index bbd4740d..99328f15 100644 --- a/include/boost/archive/impl/xml_iarchive_impl.ipp +++ b/include/boost/archive/impl/xml_iarchive_impl.ipp @@ -50,10 +50,7 @@ namespace archive { #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_STD_WSTRING template -void -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_iarchive_impl::load(std::wstring &ws){ std::string s; bool result = gimpl->parse_string(is, s); @@ -87,10 +84,7 @@ xml_iarchive_impl::load(std::wstring &ws){ #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_iarchive_impl::load(wchar_t * ws){ std::string s; bool result = gimpl->parse_string(is, s); @@ -122,10 +116,7 @@ xml_iarchive_impl::load(wchar_t * ws){ #endif // BOOST_NO_CWCHAR template -void -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_iarchive_impl::load(std::string &s){ bool result = gimpl->parse_string(is, s); if(! result) @@ -135,10 +126,7 @@ xml_iarchive_impl::load(std::string &s){ } template -void -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_iarchive_impl::load(char * s){ std::string tstring; bool result = gimpl->parse_string(is, tstring); @@ -151,10 +139,7 @@ xml_iarchive_impl::load(char * s){ } template -void -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_iarchive_impl::load_override(class_name_type & t, int){ const std::string & s = gimpl->rv.class_name; if(s.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) @@ -165,18 +150,13 @@ xml_iarchive_impl::load_override(class_name_type & t, int){ } template -void -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_iarchive_impl::init(){ gimpl->init(is); } template -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_iarchive_impl::xml_iarchive_impl( std::istream &is_, unsigned int flags @@ -193,9 +173,7 @@ xml_iarchive_impl::xml_iarchive_impl( } template -#if ! defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_iarchive_impl::~xml_iarchive_impl(){ if(0 == (this->get_flags() & no_header)){ BOOST_TRY{ diff --git a/include/boost/archive/impl/xml_oarchive_impl.ipp b/include/boost/archive/impl/xml_oarchive_impl.ipp index 7c9559ac..8ab954f4 100644 --- a/include/boost/archive/impl/xml_oarchive_impl.ipp +++ b/include/boost/archive/impl/xml_oarchive_impl.ipp @@ -50,10 +50,7 @@ void save_iterator(std::ostream &os, InputIterator begin, InputIterator end){ #ifndef BOOST_NO_STD_WSTRING template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_oarchive_impl::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 @@ -64,10 +61,7 @@ xml_oarchive_impl::save(const std::wstring & ws){ #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_oarchive_impl::save(const wchar_t * ws){ save_iterator(os, ws, ws + std::wcslen(ws)); } @@ -76,10 +70,7 @@ xml_oarchive_impl::save(const wchar_t * ws){ #endif // BOOST_NO_CWCHAR template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_oarchive_impl::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 @@ -94,10 +85,7 @@ xml_oarchive_impl::save(const std::string & s){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(void) xml_oarchive_impl::save(const char * s){ typedef boost::archive::iterators::xml_escape< const char * @@ -110,9 +98,7 @@ xml_oarchive_impl::save(const char * s){ } template -#if !defined(__BORLANDC__) -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_oarchive_impl::xml_oarchive_impl( std::ostream & os_, unsigned int flags diff --git a/include/boost/archive/impl/xml_wiarchive_impl.ipp b/include/boost/archive/impl/xml_wiarchive_impl.ipp index d937de2a..137f8cce 100644 --- a/include/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/include/boost/archive/impl/xml_wiarchive_impl.ipp @@ -68,10 +68,7 @@ void copy_to_ptr(char * s, const std::wstring & ws){ } // anonymous template -void -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(void) xml_wiarchive_impl::load(std::string & s){ std::wstring ws; bool result = gimpl->parse_string(is, ws); @@ -97,10 +94,7 @@ xml_wiarchive_impl::load(std::string & s){ #ifndef BOOST_NO_STD_WSTRING template -void -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(void) xml_wiarchive_impl::load(std::wstring & ws){ bool result = gimpl->parse_string(is, ws); if(! result) @@ -111,10 +105,7 @@ xml_wiarchive_impl::load(std::wstring & ws){ #endif template -void -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(void) xml_wiarchive_impl::load(char * s){ std::wstring ws; bool result = gimpl->parse_string(is, ws); @@ -127,10 +118,7 @@ xml_wiarchive_impl::load(char * s){ #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(void) xml_wiarchive_impl::load(wchar_t * ws){ std::wstring twstring; bool result = gimpl->parse_string(is, twstring); @@ -144,10 +132,7 @@ xml_wiarchive_impl::load(wchar_t * ws){ #endif template -void -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(void) xml_wiarchive_impl::load_override(class_name_type & t, int){ const std::wstring & ws = gimpl->rv.class_name; if(ws.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) @@ -156,18 +141,13 @@ xml_wiarchive_impl::load_override(class_name_type & t, int){ } template -void -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(void) xml_wiarchive_impl::init(){ gimpl->init(is); } template -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_wiarchive_impl::xml_wiarchive_impl( std::wistream &is_, unsigned int flags @@ -193,9 +173,7 @@ xml_wiarchive_impl::xml_wiarchive_impl( } template -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_wiarchive_impl::~xml_wiarchive_impl(){ if(0 == (this->get_flags() & no_header)){ BOOST_TRY{ diff --git a/include/boost/archive/impl/xml_woarchive_impl.ipp b/include/boost/archive/impl/xml_woarchive_impl.ipp index ff745f07..f3ee7220 100644 --- a/include/boost/archive/impl/xml_woarchive_impl.ipp +++ b/include/boost/archive/impl/xml_woarchive_impl.ipp @@ -61,8 +61,7 @@ void save_iterator(std::wostream &os, InputIterator begin, InputIterator end){ } template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) xml_woarchive_impl::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 @@ -74,8 +73,7 @@ xml_woarchive_impl::save(const std::string & s){ #ifndef BOOST_NO_STD_WSTRING template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) xml_woarchive_impl::save(const std::wstring & ws){ #if 0 typedef iterators::xml_escape xmbtows; @@ -95,16 +93,14 @@ xml_woarchive_impl::save(const std::wstring & ws){ #endif //BOOST_NO_STD_WSTRING template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) xml_woarchive_impl::save(const char * s){ save_iterator(os, s, s + std::strlen(s)); } #ifndef BOOST_NO_INTRINSIC_WCHAR_T template -void -BOOST_DECL_WARCHIVE +BOOST_WARCHIVE_DECL(void) xml_woarchive_impl::save(const wchar_t * ws){ os << ws; typedef iterators::xml_escape xmbtows; @@ -117,9 +113,7 @@ xml_woarchive_impl::save(const wchar_t * ws){ #endif template -#if !defined(__BORLANDC__) -BOOST_DECL_WARCHIVE -#endif +BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_woarchive_impl::xml_woarchive_impl( std::wostream & os_, unsigned int flags diff --git a/include/boost/archive/text_iarchive.hpp b/include/boost/archive/text_iarchive.hpp index e8ad0888..68a0b3b4 100644 --- a/include/boost/archive/text_iarchive.hpp +++ b/include/boost/archive/text_iarchive.hpp @@ -44,20 +44,16 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) load(wchar_t * t); #endif - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) load(std::wstring &ws); #endif // note: the following should not needed - but one compiler (vc 7.1) @@ -67,9 +63,9 @@ protected: void load_override(T & t, BOOST_PFTO int){ basic_text_iarchive::load_override(t, 0); } - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_iarchive_impl(std::istream & is, unsigned int flags); - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~text_iarchive_impl(){}; }; diff --git a/include/boost/archive/text_oarchive.hpp b/include/boost/archive/text_oarchive.hpp index dc0edc70..3174c9e5 100644 --- a/include/boost/archive/text_oarchive.hpp +++ b/include/boost/archive/text_oarchive.hpp @@ -53,30 +53,25 @@ protected: this->newtoken(); basic_text_oprimitive::save(t); } - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) save(const wchar_t * t); #endif - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) save(const std::wstring &ws); #endif protected: - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_oarchive_impl(std::ostream & os, unsigned int flags); - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~text_oarchive_impl(){}; public: - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) save_binary(const void *address, std::size_t count); }; diff --git a/include/boost/archive/text_wiarchive.hpp b/include/boost/archive/text_wiarchive.hpp index b93caa35..b687ca92 100644 --- a/include/boost/archive/text_wiarchive.hpp +++ b/include/boost/archive/text_wiarchive.hpp @@ -49,13 +49,17 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void BOOST_DECL_WARCHIVE load(char * t); + BOOST_WARCHIVE_DECL(void) + load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void BOOST_DECL_WARCHIVE load(wchar_t * t); + BOOST_WARCHIVE_DECL(void) + load(wchar_t * t); #endif - void BOOST_DECL_WARCHIVE load(std::string &s); + BOOST_WARCHIVE_DECL(void) + load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void BOOST_DECL_WARCHIVE load(std::wstring &ws); + 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 !!! @@ -63,7 +67,7 @@ protected: void load_override(T & t, BOOST_PFTO int){ basic_text_iarchive::load_override(t, 0); } - BOOST_DECL_WARCHIVE + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) text_wiarchive_impl(std::wistream & is, unsigned int flags); ~text_wiarchive_impl(){}; }; diff --git a/include/boost/archive/text_woarchive.hpp b/include/boost/archive/text_woarchive.hpp index f9fa223f..da6f0cab 100644 --- a/include/boost/archive/text_woarchive.hpp +++ b/include/boost/archive/text_woarchive.hpp @@ -58,13 +58,17 @@ protected: this->newtoken(); basic_text_oprimitive::save(t); } - void BOOST_DECL_WARCHIVE save(const char * t); + BOOST_WARCHIVE_DECL(void) + save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void BOOST_DECL_WARCHIVE save(const wchar_t * t); + BOOST_WARCHIVE_DECL(void) + save(const wchar_t * t); #endif - void BOOST_DECL_WARCHIVE save(const std::string &s); + BOOST_WARCHIVE_DECL(void) + save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void BOOST_DECL_WARCHIVE save(const std::wstring &ws); + BOOST_WARCHIVE_DECL(void) + save(const std::wstring &ws); #endif text_woarchive_impl(std::wostream & os, unsigned int flags) : basic_text_oprimitive( diff --git a/include/boost/archive/xml_iarchive.hpp b/include/boost/archive/xml_iarchive.hpp index 173d8593..30604491 100644 --- a/include/boost/archive/xml_iarchive.hpp +++ b/include/boost/archive/xml_iarchive.hpp @@ -57,27 +57,29 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void BOOST_DECL_ARCHIVE load(char * t); + BOOST_ARCHIVE_DECL(void) + load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void BOOST_DECL_ARCHIVE load(wchar_t * t); + BOOST_ARCHIVE_DECL(void) + load(wchar_t * t); #endif - void BOOST_DECL_ARCHIVE load(std::string &s); + BOOST_ARCHIVE_DECL(void) + load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void BOOST_DECL_ARCHIVE load(std::wstring &ws); + BOOST_ARCHIVE_DECL(void) + load(std::wstring &ws); #endif template void load_override(T & t, BOOST_PFTO int){ basic_xml_iarchive::load_override(t, 0); } - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) load_override(class_name_type & t, int); - void - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(void) init(); - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_iarchive_impl(std::istream & is, unsigned int flags); - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~xml_iarchive_impl(); }; diff --git a/include/boost/archive/xml_oarchive.hpp b/include/boost/archive/xml_oarchive.hpp index 8aab2d22..5dc90edf 100644 --- a/include/boost/archive/xml_oarchive.hpp +++ b/include/boost/archive/xml_oarchive.hpp @@ -55,15 +55,19 @@ protected: void save(const T & t){ basic_text_oprimitive::save(t); } - void BOOST_DECL_ARCHIVE save(const char * t); + BOOST_ARCHIVE_DECL(void) + save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void BOOST_DECL_ARCHIVE save(const wchar_t * t); + BOOST_ARCHIVE_DECL(void) + save(const wchar_t * t); #endif - void BOOST_DECL_ARCHIVE save(const std::string &s); + BOOST_ARCHIVE_DECL(void) + save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void BOOST_DECL_ARCHIVE save(const std::wstring &ws); + BOOST_ARCHIVE_DECL(void) + save(const std::wstring &ws); #endif - BOOST_DECL_ARCHIVE + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_oarchive_impl(std::ostream & os, unsigned int flags); ~xml_oarchive_impl(){} public: diff --git a/include/boost/archive/xml_wiarchive.hpp b/include/boost/archive/xml_wiarchive.hpp index f04a4069..ebe39894 100644 --- a/include/boost/archive/xml_wiarchive.hpp +++ b/include/boost/archive/xml_wiarchive.hpp @@ -61,27 +61,29 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void BOOST_DECL_WARCHIVE load(char * t); + BOOST_WARCHIVE_DECL(void) + load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void BOOST_DECL_WARCHIVE load(wchar_t * t); + BOOST_WARCHIVE_DECL(void) + load(wchar_t * t); #endif - void BOOST_DECL_WARCHIVE load(std::string &s); + BOOST_WARCHIVE_DECL(void) + load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - void BOOST_DECL_WARCHIVE load(std::wstring &ws); + BOOST_WARCHIVE_DECL(void) + load(std::wstring &ws); #endif template void load_override(T & t, BOOST_PFTO int){ basic_xml_iarchive::load_override(t, 0); } - void - BOOST_DECL_WARCHIVE + BOOST_WARCHIVE_DECL(void) load_override(class_name_type & t, int); - void - BOOST_DECL_WARCHIVE + BOOST_WARCHIVE_DECL(void) init(); - BOOST_DECL_WARCHIVE + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_DECL_WARCHIVE + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~xml_wiarchive_impl(); }; diff --git a/include/boost/archive/xml_woarchive.hpp b/include/boost/archive/xml_woarchive.hpp index f18a4fe0..9be6e5ed 100644 --- a/include/boost/archive/xml_woarchive.hpp +++ b/include/boost/archive/xml_woarchive.hpp @@ -39,12 +39,10 @@ namespace std{ namespace boost { namespace archive { -BOOST_DECL_WARCHIVE -std::wostream & +BOOST_WARCHIVE_DECL(std::wostream &) operator<<(std::wostream &os, const char *t); -BOOST_DECL_WARCHIVE -std::wostream & +BOOST_WARCHIVE_DECL(std::wostream &) operator<<(std::wostream &os, const char t); template @@ -64,22 +62,28 @@ protected: basic_xml_oarchive::end_preamble(); } template - void save(const T & t){ + void + save(const T & t){ basic_text_oprimitive::save(t); } - void BOOST_DECL_WARCHIVE save(const char * t); + BOOST_WARCHIVE_DECL(void) + save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void BOOST_DECL_WARCHIVE save(const wchar_t * t); + BOOST_WARCHIVE_DECL(void) + save(const wchar_t * t); #endif - void BOOST_DECL_WARCHIVE save(const std::string &s); + BOOST_WARCHIVE_DECL(void) + save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - void BOOST_DECL_WARCHIVE save(const std::wstring &ws); + BOOST_WARCHIVE_DECL(void) + save(const std::wstring &ws); #endif - BOOST_DECL_WARCHIVE + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_woarchive_impl(std::wostream & os, unsigned int flags); ~xml_woarchive_impl(){} public: - void save_binary(const void *address, std::size_t count){ + void + save_binary(const void *address, std::size_t count){ this->end_preamble(); #if ! defined(__MWERKS__) this->basic_text_oprimitive::save_binary( diff --git a/include/boost/serialization/base_object.hpp b/include/boost/serialization/base_object.hpp index 4ddd2d3a..c85af503 100644 --- a/include/boost/serialization/base_object.hpp +++ b/include/boost/serialization/base_object.hpp @@ -99,7 +99,7 @@ namespace detail { } // namespace detail // BORLAND -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) template const Base & base_object(const Derived & d) diff --git a/include/boost/serialization/collections_load_imp.hpp b/include/boost/serialization/collections_load_imp.hpp index 660ddede..64fbd32f 100644 --- a/include/boost/serialization/collections_load_imp.hpp +++ b/include/boost/serialization/collections_load_imp.hpp @@ -55,7 +55,7 @@ struct stack_allocate private: typedef BOOST_DEDUCED_TYPENAME boost::aligned_storage< sizeof(T), - #if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x564)) + #if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x560)) 8 #else boost::alignment_of::value diff --git a/include/boost/serialization/config.hpp b/include/boost/serialization/config.hpp index 2a69749d..07c18ff5 100644 --- a/include/boost/serialization/config.hpp +++ b/include/boost/serialization/config.hpp @@ -22,6 +22,7 @@ #include #include +#include // note: this version incorporates the related code into the the // the same library as BOOST_ARCHIVE. This could change some day in the @@ -36,7 +37,11 @@ #define BOOST_DYN_LINK // export if this is our own source, otherwise import: #if defined(BOOST_SERIALIZATION_SOURCE) - #define BOOST_SERIALIZATION_DECL __declspec(dllexport) + #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) + #define BOOST_SERIALIZATION_DECL(T) __declspec(dllexport) T + #else + #define BOOST_SERIALIZATION_DECL(T) T __declspec(dllexport) + #endif #pragma message( "BOOST_SERIALIZATION_DECL __declspec(dllexport)" ) #endif // defined(BOOST_SERIALIZATION_SOURCE) #endif // defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK) @@ -44,7 +49,7 @@ // if BOOST_SERIALIZATION_DECL isn't defined yet define it now: #ifndef BOOST_SERIALIZATION_DECL - #define BOOST_SERIALIZATION_DECL + #define BOOST_SERIALIZATION_DECL(T) T #endif // enable automatic library variant selection ------------------------------// @@ -66,8 +71,4 @@ //----------------------------------------------------------------------------// -#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) -# define BOOST_SERIALIZATION_STATIC_DATA_REGISTRATION_WORKAROUND 1 -#endif - #endif // BOOST_SERIALIZATION_CONFIG_HPP diff --git a/include/boost/serialization/extended_type_info.hpp b/include/boost/serialization/extended_type_info.hpp index 37ff53bf..336397f1 100644 --- a/include/boost/serialization/extended_type_info.hpp +++ b/include/boost/serialization/extended_type_info.hpp @@ -32,7 +32,7 @@ namespace boost { namespace serialization { -class BOOST_SERIALIZATION_DECL extended_type_info : +class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info : private boost::noncopyable { private: diff --git a/include/boost/serialization/extended_type_info_no_rtti.hpp b/include/boost/serialization/extended_type_info_no_rtti.hpp index 1cad77f7..fe5f9b10 100644 --- a/include/boost/serialization/extended_type_info_no_rtti.hpp +++ b/include/boost/serialization/extended_type_info_no_rtti.hpp @@ -39,7 +39,7 @@ namespace serialization { // common base class to share type_info_key. This is used to // identify the method used to keep track of the extended type -class BOOST_SERIALIZATION_DECL extended_type_info_no_rtti_base : +class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_no_rtti_base : public extended_type_info { protected: diff --git a/include/boost/serialization/extended_type_info_typeid.hpp b/include/boost/serialization/extended_type_info_typeid.hpp index f1002e48..01f52cb5 100644 --- a/include/boost/serialization/extended_type_info_typeid.hpp +++ b/include/boost/serialization/extended_type_info_typeid.hpp @@ -38,7 +38,7 @@ namespace serialization { namespace detail { -class BOOST_SERIALIZATION_DECL extended_type_info_typeid_0 : +class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_typeid_0 : public extended_type_info { private: diff --git a/include/boost/serialization/level.hpp b/include/boost/serialization/level.hpp index fdb35c2c..6901cd47 100644 --- a/include/boost/serialization/level.hpp +++ b/include/boost/serialization/level.hpp @@ -60,7 +60,7 @@ struct implementation_level { //else BOOST_DEDUCED_TYPENAME mpl::eval_if< is_array, - #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) mpl::int_, #else mpl::int_, @@ -68,7 +68,7 @@ struct implementation_level { //else BOOST_DEDUCED_TYPENAME mpl::eval_if< is_enum, - //#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + //#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) // mpl::int_, //#else mpl::int_, diff --git a/include/boost/serialization/type_info_implementation.hpp b/include/boost/serialization/type_info_implementation.hpp index 9eefff25..4c96f8ca 100644 --- a/include/boost/serialization/type_info_implementation.hpp +++ b/include/boost/serialization/type_info_implementation.hpp @@ -70,7 +70,7 @@ struct type_info_implementation { // define a macro to assign a particular derivation of extended_type_info // to a specified a class. -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) #define BOOST_CLASS_TYPE_INFO(T, ETI) \ namespace boost { \ namespace serialization { \ diff --git a/include/boost/serialization/void_cast.hpp b/include/boost/serialization/void_cast.hpp index 62c663de..332c6eaf 100644 --- a/include/boost/serialization/void_cast.hpp +++ b/include/boost/serialization/void_cast.hpp @@ -35,20 +35,14 @@ namespace boost { namespace serialization { -class BOOST_SERIALIZATION_DECL extended_type_info; +class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info; // Given a void *, assume that it really points to an instance of one type // and alter it so that it would point to an instance of a related type. // Return the altered pointer. If there exists no sequence of casts that // can transform from_type to to_type, return a NULL. -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_SERIALIZATION_DECL -void const * -#else -void const * -BOOST_SERIALIZATION_DECL -#endif +BOOST_SERIALIZATION_DECL(void const *) void_upcast( extended_type_info const & derived_type, extended_type_info const & base_type, @@ -69,13 +63,7 @@ void_upcast( )); } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_SERIALIZATION_DECL -void const * -#else -void const * -BOOST_SERIALIZATION_DECL -#endif +BOOST_SERIALIZATION_DECL(void const *) void_downcast( extended_type_info const & derived_type, extended_type_info const & base_type, @@ -99,17 +87,11 @@ void_downcast( namespace void_cast_detail { // note: can't be abstract because an instance is used as a search argument -class BOOST_SERIALIZATION_DECL void_caster +class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) void_caster { friend struct void_caster_compare ; friend - #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_SERIALIZATION_DECL - void const * - #else - void const * - BOOST_SERIALIZATION_DECL - #endif + BOOST_SERIALIZATION_DECL(void const *) boost::serialization::void_upcast( const extended_type_info & derived_type, const extended_type_info & base_type, @@ -117,13 +99,7 @@ class BOOST_SERIALIZATION_DECL void_caster bool top ); friend - #if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_SERIALIZATION_DECL - void const * - #else - void const * - BOOST_SERIALIZATION_DECL - #endif + BOOST_SERIALIZATION_DECL(void const *) boost::serialization::void_downcast( const extended_type_info & derived_type, const extended_type_info & base_type, diff --git a/include/boost/smart_cast.hpp b/include/boost/smart_cast.hpp index b6609271..756afc3a 100644 --- a/include/boost/smart_cast.hpp +++ b/include/boost/smart_cast.hpp @@ -81,7 +81,7 @@ namespace smart_cast_impl { static T cast(U & u){ // if we're in debug mode #if ! defined(NDEBUG) \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x564) \ + || defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) \ || defined(__MWERKS__) // do a checked dynamic cast return cross::cast(u); @@ -166,7 +166,7 @@ namespace smart_cast_impl { template static T cast(U * u){ // if we're in debug mode - #if ! defined(NDEBUG) || defined(__BORLANDC__) && (__BORLANDC__ <= 0x564) + #if ! defined(NDEBUG) || defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) // do a checked dynamic cast return cross::cast(u); #else diff --git a/src/basic_archive.cpp b/src/basic_archive.cpp index 776cc7e0..4342e7af 100644 --- a/src/basic_archive.cpp +++ b/src/basic_archive.cpp @@ -41,13 +41,7 @@ namespace archive { // constants used in archive signature //This should never ever change. note that is not an std::string // string. -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const char * -#else - const char * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) ARCHIVE_SIGNATURE(){ return "serialization::archive"; } @@ -58,8 +52,8 @@ ARCHIVE_SIGNATURE(){ // 1 - initial version // 2 - made address tracking optional // 3 - numerous changes - can't guarentee compatibility with previous versions -unsigned char -BOOST_DECL_ARCHIVE + +BOOST_ARCHIVE_DECL(unsigned char) ARCHIVE_VERSION(){ return 3; } diff --git a/src/basic_archive_impl.cpp b/src/basic_archive_impl.cpp index 1dc7ca9c..c2645347 100644 --- a/src/basic_archive_impl.cpp +++ b/src/basic_archive_impl.cpp @@ -18,8 +18,7 @@ namespace boost { namespace archive { namespace detail { -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_archive_impl::lookup_helper( const boost::serialization::extended_type_info * const eti, shared_ptr & sph @@ -33,8 +32,7 @@ basic_archive_impl::lookup_helper( sph = it->m_helper; } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_archive_impl::insert_helper( const boost::serialization::extended_type_info * const eti, shared_ptr & sph diff --git a/src/basic_iarchive.cpp b/src/basic_iarchive.cpp index fed103eb..4b32ae9e 100644 --- a/src/basic_iarchive.cpp +++ b/src/basic_iarchive.cpp @@ -500,31 +500,28 @@ basic_iarchive_impl::load_pointer( ////////////////////////////////////////////////////////////////////// // implementation of basic_iarchive functions -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::next_object_pointer(void *t){ pimpl->next_object_pointer(t); } -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive::basic_iarchive(unsigned int flags) : pimpl(new basic_iarchive_impl(flags)) {} -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive::~basic_iarchive() { delete pimpl; } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::set_library_version(unsigned int archive_library_version){ pimpl->set_library_version(archive_library_version); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::reset_object_address( const void * new_address, const void * old_address @@ -532,8 +529,7 @@ basic_iarchive::reset_object_address( pimpl->reset_object_address(new_address, old_address); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::load_object( void *t, const basic_iserializer & bis @@ -542,13 +538,7 @@ basic_iarchive::load_object( } // load a pointer object -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const basic_pointer_iserializer * -#else - const basic_pointer_iserializer * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const basic_pointer_iserializer *) basic_iarchive::load_pointer( void * &t, const basic_pointer_iserializer * bpis_ptr, @@ -559,14 +549,12 @@ basic_iarchive::load_pointer( return pimpl->load_pointer(*this, t, bpis_ptr, finder); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::register_basic_serializer(const basic_iserializer & bis){ pimpl->register_type(bis); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::lookup_basic_helper( const boost::serialization::extended_type_info * const eti, shared_ptr & sph @@ -574,8 +562,7 @@ basic_iarchive::lookup_basic_helper( pimpl->lookup_helper(eti, sph); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::insert_basic_helper( const boost::serialization::extended_type_info * const eti, shared_ptr & sph @@ -583,21 +570,18 @@ basic_iarchive::insert_basic_helper( pimpl->insert_helper(eti, sph); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_iarchive::delete_created_pointers() { pimpl->delete_created_pointers(); } -unsigned int -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(unsigned int) basic_iarchive::get_library_version() const{ return pimpl->m_archive_library_version; } -unsigned int -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(unsigned int) basic_iarchive::get_flags() const{ return pimpl->m_flags; } diff --git a/src/basic_iserializer.cpp b/src/basic_iserializer.cpp index 75cb3f38..cd6ba320 100644 --- a/src/basic_iserializer.cpp +++ b/src/basic_iserializer.cpp @@ -15,7 +15,7 @@ namespace boost { namespace archive { namespace detail { -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer::basic_iserializer( const boost::serialization::extended_type_info & type_ ) : @@ -23,7 +23,7 @@ basic_iserializer::basic_iserializer( bpis(NULL) {} -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer::~basic_iserializer(){} } // namespace detail diff --git a/src/basic_oarchive.cpp b/src/basic_oarchive.cpp index e4a1b1d3..178cb2fd 100644 --- a/src/basic_oarchive.cpp +++ b/src/basic_oarchive.cpp @@ -392,19 +392,18 @@ basic_oarchive_impl::save_pointer( ////////////////////////////////////////////////////////////////////// // implementation of basic_oarchive functions -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive::basic_oarchive(unsigned int flags) : pimpl(new basic_oarchive_impl(flags)) {} -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive::~basic_oarchive() { delete pimpl; } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_oarchive::save_object( const void *x, const basic_oserializer & bos @@ -412,8 +411,7 @@ basic_oarchive::save_object( pimpl->save_object(*this, x, bos); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_oarchive::save_pointer( const void * t, const basic_pointer_oserializer * bpos_ptr @@ -421,14 +419,12 @@ basic_oarchive::save_pointer( pimpl->save_pointer(*this, t, bpos_ptr); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_oarchive::register_basic_serializer(const basic_oserializer & bos){ pimpl->register_type(bos); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_oarchive::lookup_basic_helper( const boost::serialization::extended_type_info * const eti, shared_ptr & sph @@ -436,8 +432,7 @@ basic_oarchive::lookup_basic_helper( pimpl->lookup_helper(eti, sph); } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_oarchive::insert_basic_helper( const boost::serialization::extended_type_info * const eti, shared_ptr & sph @@ -445,20 +440,17 @@ basic_oarchive::insert_basic_helper( pimpl->insert_helper(eti, sph); } -unsigned int -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(unsigned int) basic_oarchive::get_library_version() const{ return ARCHIVE_VERSION(); } -unsigned int -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(unsigned int) basic_oarchive::get_flags() const{ return pimpl->m_flags; } -void -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(void) basic_oarchive::end_preamble(){ } diff --git a/src/basic_oserializer.cpp b/src/basic_oserializer.cpp index 5fd0ece2..19d28bb4 100644 --- a/src/basic_oserializer.cpp +++ b/src/basic_oserializer.cpp @@ -15,7 +15,7 @@ namespace boost { namespace archive { namespace detail { -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer::basic_oserializer( const boost::serialization::extended_type_info & type_ ) : @@ -23,7 +23,7 @@ basic_oserializer::basic_oserializer( bpos(NULL) {} -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer::~basic_oserializer(){} } // namespace detail diff --git a/src/basic_pointer_iserializer.cpp b/src/basic_pointer_iserializer.cpp index bf04ae12..0a135bbe 100644 --- a/src/basic_pointer_iserializer.cpp +++ b/src/basic_pointer_iserializer.cpp @@ -15,14 +15,14 @@ namespace boost { namespace archive { namespace detail { -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer::basic_pointer_iserializer( const boost::serialization::extended_type_info & type_ ) : basic_serializer(type_) {} -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer::~basic_pointer_iserializer() {} } // namespace detail diff --git a/src/basic_pointer_oserializer.cpp b/src/basic_pointer_oserializer.cpp index ae126706..9cad5a38 100644 --- a/src/basic_pointer_oserializer.cpp +++ b/src/basic_pointer_oserializer.cpp @@ -15,14 +15,14 @@ namespace boost { namespace archive { namespace detail { -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer::basic_pointer_oserializer( const boost::serialization::extended_type_info & type_ ) : basic_serializer(type_) {} -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer::~basic_pointer_oserializer() {} } // namespace detail diff --git a/src/basic_serializer_map.cpp b/src/basic_serializer_map.cpp index 2f5097b7..a2e634d5 100644 --- a/src/basic_serializer_map.cpp +++ b/src/basic_serializer_map.cpp @@ -25,12 +25,11 @@ namespace boost { namespace archive { namespace detail { -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer_map::basic_serializer_map(){ } -bool -BOOST_DECL_ARCHIVE +BOOST_ARCHIVE_DECL(bool) basic_serializer_map::insert(const basic_serializer * bs){ return map.insert(bs).second; } @@ -42,13 +41,7 @@ public: {} }; -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) - BOOST_DECL_ARCHIVE - const basic_serializer * -#else - const basic_serializer * - BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const basic_serializer *) basic_serializer_map::tfind( const boost::serialization::extended_type_info & type_ ) const { diff --git a/src/basic_xml_archive.cpp b/src/basic_xml_archive.cpp index f3990e54..95c769c3 100644 --- a/src/basic_xml_archive.cpp +++ b/src/basic_xml_archive.cpp @@ -14,83 +14,35 @@ namespace boost { namespace archive { -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) OBJECT_ID(){ return "object_id"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) OBJECT_REFERENCE(){ return "object_id_reference"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) CLASS_ID(){ return "class_id"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) CLASS_ID_REFERENCE(){ return "class_id_reference"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) CLASS_NAME(){ return "class_name"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) TRACKING(){ return "tracking_level"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) VERSION(){ return "version"; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_DECL_ARCHIVE -const char * -#else -const char * -BOOST_DECL_ARCHIVE -#endif +BOOST_ARCHIVE_DECL(const char *) SIGNATURE(){ return "signature"; } diff --git a/src/extended_type_info.cpp b/src/extended_type_info.cpp index caa8eb55..0cba3728 100644 --- a/src/extended_type_info.cpp +++ b/src/extended_type_info.cpp @@ -176,19 +176,19 @@ ktmap * ktmap::m_self = NULL; } // namespace detail -BOOST_SERIALIZATION_DECL const extended_type_info * +BOOST_SERIALIZATION_DECL(const extended_type_info *) extended_type_info::find(const char *key) { return detail::ktmap::find(key); } -BOOST_SERIALIZATION_DECL void +BOOST_SERIALIZATION_DECL(void) extended_type_info::self_register() { detail::tkmap::insert(this); } -BOOST_SERIALIZATION_DECL void +BOOST_SERIALIZATION_DECL(void) extended_type_info::key_register(const char *key_) { if(NULL == key_) return; @@ -196,13 +196,13 @@ extended_type_info::key_register(const char *key_) { detail::ktmap::insert(this); } -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info::extended_type_info(const char * type_info_key_) : type_info_key(type_info_key_), key(NULL) {} -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info::~extended_type_info(){ // remove entries in maps which correspond to this type BOOST_TRY{ @@ -215,7 +215,7 @@ extended_type_info::~extended_type_info(){ } -int BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(int) extended_type_info::type_info_key_cmp(const extended_type_info & rhs) const { if(type_info_key == rhs.type_info_key) return 0; @@ -225,13 +225,13 @@ extended_type_info::type_info_key_cmp(const extended_type_info & rhs) const { return type_info_key < rhs.type_info_key ? -1 : 1; } -BOOST_SERIALIZATION_DECL const extended_type_info * +BOOST_SERIALIZATION_DECL(const extended_type_info *) extended_type_info::find(const extended_type_info * t) { return detail::tkmap::find(t); } -bool BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(bool) extended_type_info::operator<(const extended_type_info &rhs) const { int i = type_info_key_cmp(rhs); if(i < 0) @@ -241,7 +241,7 @@ extended_type_info::operator<(const extended_type_info &rhs) const { return less_than(rhs); } -bool BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(bool) extended_type_info::operator==(const extended_type_info &rhs) const { int i = type_info_key_cmp(rhs); if(i != 0) @@ -249,7 +249,7 @@ extended_type_info::operator==(const extended_type_info &rhs) const { return equal_to(rhs); } -bool BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(bool) extended_type_info::operator!=(const extended_type_info &rhs) const { int i = type_info_key_cmp(rhs); if(i != 0) diff --git a/src/extended_type_info_no_rtti.cpp b/src/extended_type_info_no_rtti.cpp index 91542c41..a1c99daf 100644 --- a/src/extended_type_info_no_rtti.cpp +++ b/src/extended_type_info_no_rtti.cpp @@ -21,31 +21,31 @@ namespace std{ using ::strcmp; } namespace boost { namespace serialization { -BOOST_SERIALIZATION_DECL bool +BOOST_SERIALIZATION_DECL(bool) extended_type_info_no_rtti_base::less_than( const boost::serialization::extended_type_info &rhs) const { return std::strcmp(key, rhs.key) < 0; } -BOOST_SERIALIZATION_DECL bool +BOOST_SERIALIZATION_DECL(bool) extended_type_info_no_rtti_base::equal_to( const boost::serialization::extended_type_info &rhs) const { return std::strcmp(key, rhs.key) == 0; } -BOOST_SERIALIZATION_DECL bool +BOOST_SERIALIZATION_DECL(bool) extended_type_info_no_rtti_base::not_equal_to( const boost::serialization::extended_type_info &rhs) const { return std::strcmp(key, rhs.key) != 0; } -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_no_rtti_base::extended_type_info_no_rtti_base() : boost::serialization::extended_type_info("extended_type_info_no_rtti") {} -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_no_rtti_base::~extended_type_info_no_rtti_base() {} diff --git a/src/extended_type_info_typeid.cpp b/src/extended_type_info_typeid.cpp index a2af7df4..d55209b0 100644 --- a/src/extended_type_info_typeid.cpp +++ b/src/extended_type_info_typeid.cpp @@ -16,21 +16,21 @@ namespace boost { namespace serialization { namespace detail { -BOOST_SERIALIZATION_DECL bool +BOOST_SERIALIZATION_DECL(bool) extended_type_info_typeid_0::less_than(const extended_type_info &rhs) const { return 0 != get_type().before( static_cast(rhs).get_type() ); } -BOOST_SERIALIZATION_DECL bool +BOOST_SERIALIZATION_DECL(bool) extended_type_info_typeid_0::equal_to(const extended_type_info &rhs) const { return 0 != get_type().operator==( static_cast(rhs).get_type() ); } -BOOST_SERIALIZATION_DECL bool +BOOST_SERIALIZATION_DECL(bool) extended_type_info_typeid_0::not_equal_to(const extended_type_info &rhs) const { return 0 != get_type().operator!=( @@ -38,12 +38,12 @@ extended_type_info_typeid_0::not_equal_to(const extended_type_info &rhs) const ); } -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_typeid_0::extended_type_info_typeid_0() : extended_type_info("extended_type_info_typeid") {} -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_typeid_0::~extended_type_info_typeid_0() {} @@ -67,7 +67,7 @@ public: } }; -BOOST_SERIALIZATION_DECL const extended_type_info * +BOOST_SERIALIZATION_DECL(const extended_type_info *) extended_type_info_typeid_0::get_derived_extended_type_info( const std::type_info & ti ){ diff --git a/src/void_cast.cpp b/src/void_cast.cpp index de520d20..f8dc094d 100644 --- a/src/void_cast.cpp +++ b/src/void_cast.cpp @@ -128,7 +128,7 @@ void_caster_registry::purge(const extended_type_info * eti){ } } -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) void_caster::void_caster( extended_type_info const & derived_type_, extended_type_info const & base_type_ @@ -137,7 +137,7 @@ void_caster::void_caster( m_base_type(base_type_) {} -BOOST_SERIALIZATION_DECL +BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) void_caster::~void_caster(){} bool @@ -145,7 +145,7 @@ void_caster::includes(const extended_type_info * eti) const { return & m_derived_type == eti || & m_base_type == eti; } -void BOOST_SERIALIZATION_DECL +void BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) void_caster::static_register(const void_caster * vcp) { void_caster_registry::insert(shared_ptr(vcp, null_deleter())); @@ -197,7 +197,7 @@ public: } // namespace void_cast_detail -void BOOST_SERIALIZATION_DECL +void BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) unregister_void_casts(extended_type_info *eti) { void_cast_detail::void_caster_registry::purge(eti); @@ -207,13 +207,8 @@ unregister_void_casts(extended_type_info *eti) // and alter it so that it would point to an instance of a related type. // Return the altered pointer. If there exists no sequence of casts that // can transform from_type to to_type, return a NULL. -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_SERIALIZATION_DECL -void const * -#else -void const * -BOOST_SERIALIZATION_DECL -#endif + +BOOST_SERIALIZATION_DECL(void const *) void_upcast( extended_type_info const & derived_type, extended_type_info const & base_type, @@ -275,13 +270,7 @@ void_upcast( return t_new; } -#if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MWERKS__) -BOOST_SERIALIZATION_DECL -void const * -#else -void const * -BOOST_SERIALIZATION_DECL -#endif +BOOST_SERIALIZATION_DECL(void const *) void_downcast( const extended_type_info & derived_type, const extended_type_info & base_type, diff --git a/src/xml_iarchive.cpp b/src/xml_iarchive.cpp index 64ff2b5d..c5298275 100644 --- a/src/xml_iarchive.cpp +++ b/src/xml_iarchive.cpp @@ -19,7 +19,7 @@ // certain parts of mpl. including this here makes sure that happens #include #include -#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564 ) +#if BOOST_WORKAROUND(__BORLANDC__, <= 0x560 ) #include #endif diff --git a/src/xml_wiarchive.cpp b/src/xml_wiarchive.cpp index 3403ff7f..8957e0f2 100644 --- a/src/xml_wiarchive.cpp +++ b/src/xml_wiarchive.cpp @@ -24,7 +24,7 @@ // the following works around an issue between spirit 1.61 and borland. // it turns out the the certain spirit stuff must be defined before // certain parts of mpl. including this here makes sure that happens -#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564 ) +#if BOOST_WORKAROUND(__BORLANDC__, <= 0x560 ) #include #endif diff --git a/src/xml_woarchive.cpp b/src/xml_woarchive.cpp index f10d10a1..21efc314 100644 --- a/src/xml_woarchive.cpp +++ b/src/xml_woarchive.cpp @@ -26,8 +26,7 @@ namespace boost { namespace archive { -BOOST_DECL_WARCHIVE -std::wostream & +BOOST_WARCHIVE_DECL(std::wostream &) operator<<(std::wostream &os, const char *t){ for(;;){ wchar_t wc; @@ -47,8 +46,7 @@ operator<<(std::wostream &os, const char *t){ return os; } -BOOST_DECL_WARCHIVE -std::wostream & +BOOST_WARCHIVE_DECL(std::wostream &) operator<<(std::wostream &os, const char t){ wchar_t wc; std::mbtowc(&wc, &t, 1); diff --git a/test/Jamfile b/test/Jamfile index bef1363b..f2c79e38 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -46,8 +46,7 @@ rule run-template ( test-name : sources * : requirements * ) { : # requirements std::locale-support toolset::require-boost-spirit-support - <*>"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066" - <*>"-w-8080 -w-8071 -w-8057 -w-8062" + <*>"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066" $(requirements) : # test name $(test-name)