From cd2f77defb12671b29ba9ea451d7a3865a81aa2e Mon Sep 17 00:00:00 2001 From: Robert Ramey Date: Thu, 5 Oct 2017 11:40:00 -0700 Subject: [PATCH] Trying to fix three issues a) appveyor for mingw b) usage of macros "defined" in iserializer.hpp c) extra decl... in codecvt_null d) get_lock not found in singleton.hpp --- include/boost/archive/codecvt_null.hpp | 8 ++++---- include/boost/archive/detail/iserializer.hpp | 12 ++++-------- include/boost/archive/iterators/mb_from_wchar.hpp | 13 ++++++++----- include/boost/serialization/singleton.hpp | 2 +- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/include/boost/archive/codecvt_null.hpp b/include/boost/archive/codecvt_null.hpp index 7bce2b9b..bda3d519 100644 --- a/include/boost/archive/codecvt_null.hpp +++ b/include/boost/archive/codecvt_null.hpp @@ -65,7 +65,7 @@ public: template<> class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt { - virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result + virtual BOOST_ARCHIVE_DECL std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -75,7 +75,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt : public std::codecvt(no_locale_manage) {} - virtual ~codecvt_null(){}; + BOOST_ARCHIVE_DECL virtual ~codecvt_null(){}; }; } // namespace archive diff --git a/include/boost/archive/detail/iserializer.hpp b/include/boost/archive/detail/iserializer.hpp index 53c2f1df..ab50668e 100644 --- a/include/boost/archive/detail/iserializer.hpp +++ b/include/boost/archive/detail/iserializer.hpp @@ -57,19 +57,15 @@ namespace std{ #include -#ifndef BOOST_MSVC - #if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) +#if BOOST_WORKAROUND(__IBMCPP__, < 1210) \ +|| ( \ + defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \ +) #define DONT_USE_HAS_NEW_OPERATOR 1 - #elif BOOST_WORKAROUND(__IBMCPP__, < 1210) - #define DONT_USE_HAS_NEW_OPERATOR 1 - #else - #define DONT_USE_HAS_NEW_OPERATOR 1 - #endif #else #define DONT_USE_HAS_NEW_OPERATOR 0 #endif - #if ! DONT_USE_HAS_NEW_OPERATOR #include #endif diff --git a/include/boost/archive/iterators/mb_from_wchar.hpp b/include/boost/archive/iterators/mb_from_wchar.hpp index 05df71c2..eb30480c 100644 --- a/include/boost/archive/iterators/mb_from_wchar.hpp +++ b/include/boost/archive/iterators/mb_from_wchar.hpp @@ -86,12 +86,15 @@ class mb_from_wchar wchar_t value = * this->base_reference(); const wchar_t *wend; char *bend; - std::codecvt_base::result r = m_codecvt_facet.out( - m_mbs, - & value, & value + 1, wend, - m_buffer, m_buffer + sizeof(m_buffer), bend + BOOST_VERIFY( + m_codecvt_facet.out( + m_mbs, + & value, & value + 1, wend, + m_buffer, m_buffer + sizeof(m_buffer), bend + ) + == + std::codecvt_base::ok ); - BOOST_ASSERT(std::codecvt_base::ok == r); m_bnext = 0; m_bend = bend - m_buffer; } diff --git a/include/boost/serialization/singleton.hpp b/include/boost/serialization/singleton.hpp index b9e470fa..2481c76e 100644 --- a/include/boost/serialization/singleton.hpp +++ b/include/boost/serialization/singleton.hpp @@ -91,7 +91,7 @@ class BOOST_SYMBOL_VISIBLE singleton_module : public boost::noncopyable { private: - BOOST_SERIALIZATION_DECL static bool & get_lock() BOOST_USED; + BOOST_DLLEXPORT static bool & get_lock() BOOST_USED; public: BOOST_DLLEXPORT static void lock(){ get_lock() = true;