summaryrefslogtreecommitdiff
path: root/boost/serialization
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:38:45 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:39:52 +0900
commit5cde13f21d36c7224b0e13d11c4b49379ae5210d (patch)
treee8269ac85a4b0f7d416e2565fa4f451b5cb41351 /boost/serialization
parentd9ec475d945d3035377a0d89ed42e382d8988891 (diff)
downloadboost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.gz
boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.bz2
boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.zip
Imported Upstream version 1.61.0
Change-Id: I96a1f878d1e6164f01e9aadd5147f38fca448d90 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/serialization')
-rw-r--r--boost/serialization/archive_input_unordered_map.hpp16
-rw-r--r--boost/serialization/archive_input_unordered_set.hpp19
-rw-r--r--boost/serialization/array.hpp90
-rw-r--r--boost/serialization/assume_abstract.hpp1
-rw-r--r--boost/serialization/base_object.hpp1
-rw-r--r--boost/serialization/collection_traits.hpp2
-rw-r--r--boost/serialization/detail/stack_constructor.hpp1
-rw-r--r--boost/serialization/export.hpp2
-rw-r--r--boost/serialization/forward_list.hpp13
-rw-r--r--boost/serialization/is_bitwise_serializable.hpp2
-rw-r--r--boost/serialization/map.hpp9
-rw-r--r--boost/serialization/nvp.hpp32
-rw-r--r--boost/serialization/set.hpp7
-rw-r--r--boost/serialization/singleton.hpp26
-rw-r--r--boost/serialization/static_warning.hpp1
-rw-r--r--boost/serialization/traits.hpp2
-rw-r--r--boost/serialization/unique_ptr.hpp4
-rw-r--r--boost/serialization/valarray.hpp18
-rw-r--r--boost/serialization/vector.hpp6
-rw-r--r--boost/serialization/vector_135.hpp2
-rw-r--r--boost/serialization/wrapper.hpp2
21 files changed, 142 insertions, 114 deletions
diff --git a/boost/serialization/archive_input_unordered_map.hpp b/boost/serialization/archive_input_unordered_map.hpp
index 7ea06e1a68..ef0fd93ebd 100644
--- a/boost/serialization/archive_input_unordered_map.hpp
+++ b/boost/serialization/archive_input_unordered_map.hpp
@@ -37,10 +37,13 @@ struct archive_input_unordered_map
){
typedef typename Container::value_type type;
detail::stack_construct<Archive, type> t(ar, v);
- // borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
std::pair<typename Container::const_iterator, bool> result =
- s.insert(t.reference());
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ s.insert(t.reference());
+ #else
+ s.emplace(t.reference());
+ #endif
// note: the following presumes that the map::value_type was NOT tracked
// in the archive. This is the usual case, but here there is no way
// to determine that.
@@ -64,10 +67,13 @@ struct archive_input_unordered_multimap
){
typedef typename Container::value_type type;
detail::stack_construct<Archive, type> t(ar, v);
- // borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
- typename Container::const_iterator result
- = s.insert(t.reference());
+ typename Container::const_iterator result =
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ s.insert(t.reference());
+ #else
+ s.emplace(t.reference());
+ #endif
// note: the following presumes that the map::value_type was NOT tracked
// in the archive. This is the usual case, but here there is no way
// to determine that.
diff --git a/boost/serialization/archive_input_unordered_set.hpp b/boost/serialization/archive_input_unordered_set.hpp
index 353507e3a2..961b58f1a8 100644
--- a/boost/serialization/archive_input_unordered_set.hpp
+++ b/boost/serialization/archive_input_unordered_set.hpp
@@ -17,9 +17,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
-#include <boost/config.hpp>
-
-namespace boost {
+namespace boost {
namespace serialization {
namespace stl {
@@ -38,7 +36,11 @@ struct archive_input_unordered_set
// borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
std::pair<typename Container::const_iterator, bool> result =
- s.insert(t.reference());
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ s.insert(t.reference());
+ #else
+ s.emplace(t.reference());
+ #endif
if(result.second)
ar.reset_object_address(& (* result.first), & t.reference());
}
@@ -55,10 +57,13 @@ struct archive_input_unordered_multiset
){
typedef typename Container::value_type type;
detail::stack_construct<Archive, type> t(ar, v);
- // borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
- typename Container::const_iterator result
- = s.insert(t.reference());
+ typename Container::const_iterator result =
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ s.insert(t.reference());
+ #else
+ s.emplace(t.reference());
+ #endif
ar.reset_object_address(& (* result), & t.reference());
}
};
diff --git a/boost/serialization/array.hpp b/boost/serialization/array.hpp
index 97ac0c2501..2cd023aca9 100644
--- a/boost/serialization/array.hpp
+++ b/boost/serialization/array.hpp
@@ -6,13 +6,9 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
+//#include <iostream>
-#include <iostream>
-#include <cstddef> // std::size_t
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
-#include <array>
-#endif
+#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
@@ -23,11 +19,13 @@ namespace std{
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/split_member.hpp>
#include <boost/serialization/wrapper.hpp>
+#include <boost/serialization/collection_size_type.hpp>
#include <boost/mpl/always.hpp>
#include <boost/mpl/apply.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#include <boost/type_traits/remove_const.hpp>
-#include <boost/array.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/static_assert.hpp>
namespace boost { namespace serialization {
@@ -37,24 +35,27 @@ template <class Archive>
struct use_array_optimization : boost::mpl::always<boost::mpl::false_> {};
template<class T>
-class array :
- public wrapper_traits<const array< T > >
+class array_wrapper :
+ public wrapper_traits<const array_wrapper< T > >
{
-public:
- typedef T value_type;
-
- array(value_type* t, std::size_t s) :
- m_t(t),
- m_element_count(s)
- {}
- array(const array & rhs) :
+private:
+ array_wrapper & operator=(const array_wrapper & rhs);
+public:
+ // note: I would like to make the copy constructor private but this breaks
+ // make_array. So I try to make make_array a friend - but that doesn't
+ // build. Need a C++ guru to explain this!
+ template<class S>
+ friend const boost::serialization::array_wrapper<T> make_array( T* t, S s);
+
+ array_wrapper(const array_wrapper & rhs) :
m_t(rhs.m_t),
m_element_count(rhs.m_element_count)
{}
- array & operator=(const array & rhs){
- m_t = rhs.m_t;
- m_element_count = rhs.m_element_count;
- }
+public:
+ array_wrapper(T * t, std::size_t s) :
+ m_t(t),
+ m_element_count(s)
+ {}
// default implementation
template<class Archive>
@@ -62,7 +63,7 @@ public:
{
// default implemention does the loop
std::size_t c = count();
- value_type * t = address();
+ T * t = address();
while(0 < c--)
ar & boost::serialization::make_nvp("item", *t++);
}
@@ -99,7 +100,7 @@ public:
serialize_optimized(ar,version,use_optimized());
}
- value_type* address() const
+ T * address() const
{
return m_t;
}
@@ -108,26 +109,32 @@ public:
{
return m_element_count;
}
-
+
private:
- value_type* m_t;
- std::size_t m_element_count;
+ T * const m_t;
+ const std::size_t m_element_count;
};
-template<class T>
+template<class T, class S>
inline
-const array< T > make_array( T* t, std::size_t s){
- return array< T >(t, s);
+const array_wrapper< T > make_array( T* t, S s){
+ const array_wrapper< T > a(t, s);
+ return a;
}
-// implement serialization for boost::array
-template <class Archive, class T, std::size_t N>
-void serialize(Archive& ar, boost::array<T,N>& a, const unsigned int /* version */)
-{
- ar & boost::serialization::make_nvp("elems", a.elems);
-}
+} } // end namespace boost::serialization
+
+// I can't figure out why BOOST_NO_CXX11_HDR_ARRAY
+// has been set for clang-11. So just make sure
+// it's reset now. Needs further research!!!
+
+#if defined(_LIBCPP_VERSION)
+#undef BOOST_NO_CXX11_HDR_ARRAY
+#endif
#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include <array>
+namespace boost { namespace serialization {
// implement serialization for std::array
template <class Archive, class T, std::size_t N>
void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */)
@@ -138,8 +145,19 @@ void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */
);
}
+} } // end namespace boost::serialization
#endif
+#include <boost/array.hpp>
+
+namespace boost { namespace serialization {
+// implement serialization for boost::array
+template <class Archive, class T, std::size_t N>
+void serialize(Archive& ar, boost::array<T,N>& a, const unsigned int /* version */)
+{
+ ar & boost::serialization::make_nvp("elems", a.elems);
+}
+
} } // end namespace boost::serialization
#define BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(Archive) \
diff --git a/boost/serialization/assume_abstract.hpp b/boost/serialization/assume_abstract.hpp
index a5cb2f55a4..632f9312f5 100644
--- a/boost/serialization/assume_abstract.hpp
+++ b/boost/serialization/assume_abstract.hpp
@@ -19,6 +19,7 @@
// this is useful for compilers which don't support the boost::is_abstract
#include <boost/type_traits/is_abstract.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#ifndef BOOST_NO_IS_ABSTRACT
diff --git a/boost/serialization/base_object.hpp b/boost/serialization/base_object.hpp
index 7ede6473e0..1a82cecd4b 100644
--- a/boost/serialization/base_object.hpp
+++ b/boost/serialization/base_object.hpp
@@ -25,7 +25,6 @@
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/int.hpp>
-#include <boost/mpl/bool.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
diff --git a/boost/serialization/collection_traits.hpp b/boost/serialization/collection_traits.hpp
index b3fe843426..3ec9401eff 100644
--- a/boost/serialization/collection_traits.hpp
+++ b/boost/serialization/collection_traits.hpp
@@ -23,7 +23,7 @@
// exists for archives to be non-portable if class information for primitive
// types is included. This is addressed by the following macros.
#include <boost/config.hpp>
-#include <boost/mpl/integral_c.hpp>
+//#include <boost/mpl/integral_c.hpp>
#include <boost/mpl/integral_c_tag.hpp>
#include <boost/cstdint.hpp>
diff --git a/boost/serialization/detail/stack_constructor.hpp b/boost/serialization/detail/stack_constructor.hpp
index 9027717a92..806b8877d7 100644
--- a/boost/serialization/detail/stack_constructor.hpp
+++ b/boost/serialization/detail/stack_constructor.hpp
@@ -17,6 +17,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/aligned_storage.hpp>
+#include <boost/serialization/serialization.hpp>
namespace boost{
namespace serialization {
diff --git a/boost/serialization/export.hpp b/boost/serialization/export.hpp
index 9da9434a5f..9eef440df4 100644
--- a/boost/serialization/export.hpp
+++ b/boost/serialization/export.hpp
@@ -32,7 +32,7 @@
#include <boost/mpl/assert.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#include <boost/serialization/extended_type_info.hpp> // for guid_defined only
#include <boost/serialization/static_warning.hpp>
diff --git a/boost/serialization/forward_list.hpp b/boost/serialization/forward_list.hpp
index fd52f860b7..e17405383c 100644
--- a/boost/serialization/forward_list.hpp
+++ b/boost/serialization/forward_list.hpp
@@ -19,6 +19,11 @@
#include <forward_list>
#include <iterator> // distance
+#include <boost/config.hpp>
+#ifdef BOOST_NO_CXX11_HDR_FORWARD_LIST
+#error "not supported for versions earlier than c++11
+#endif
+
#include <boost/serialization/collections_save_imp.hpp>
#include <boost/serialization/collections_load_imp.hpp>
#include <boost/archive/detail/basic_iarchive.hpp>
@@ -36,7 +41,7 @@ template<class Archive, class U, class Allocator>
inline void save(
Archive & ar,
const std::forward_list<U, Allocator> &t,
- const unsigned int file_version
+ const unsigned int /*file_version*/
){
const collection_size_type count(std::distance(t.cbegin(), t.cend()));
boost::serialization::stl::save_collection<
@@ -67,14 +72,14 @@ collection_load_impl(
t.clear();
boost::serialization::detail::stack_construct<Archive, T> u(ar, item_version);
ar >> boost::serialization::make_nvp("item", u.reference());
- t.push_front(u.reference());
+ t.emplace_front(u.reference());
typename std::forward_list<T, Allocator>::iterator last;
last = t.begin();
ar.reset_object_address(&(*t.begin()) , & u.reference());
while(--count > 0){
detail::stack_construct<Archive, T> u(ar, item_version);
ar >> boost::serialization::make_nvp("item", u.reference());
- last = t.insert_after(last, u.reference());
+ last = t.emplace_after(last, u.reference());
ar.reset_object_address(&(*last) , & u.reference());
}
}
@@ -85,7 +90,7 @@ template<class Archive, class U, class Allocator>
inline void load(
Archive & ar,
std::forward_list<U, Allocator> &t,
- const unsigned int file_version
+ const unsigned int /*file_version*/
){
const boost::archive::library_version_type library_version(
ar.get_library_version()
diff --git a/boost/serialization/is_bitwise_serializable.hpp b/boost/serialization/is_bitwise_serializable.hpp
index dac597ec2c..7e24a2cb6d 100644
--- a/boost/serialization/is_bitwise_serializable.hpp
+++ b/boost/serialization/is_bitwise_serializable.hpp
@@ -21,7 +21,7 @@
# pragma once
#endif
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
namespace boost {
diff --git a/boost/serialization/map.hpp b/boost/serialization/map.hpp
index 1358d49b7a..2582f9aced 100644
--- a/boost/serialization/map.hpp
+++ b/boost/serialization/map.hpp
@@ -57,11 +57,16 @@ inline void load_map_collection(Archive & ar, Container &s)
while(count-- > 0){
typedef typename Container::value_type type;
detail::stack_construct<Archive, type> t(ar, item_version);
- // borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
- typename Container::iterator result = s.insert(hint, t.reference());
+ typename Container::iterator result =
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP
+ s.insert(hint, t.reference());
+ #else
+ s.emplace_hint(hint, t.reference());
+ #endif
ar.reset_object_address(& (result->second), & t.reference().second);
hint = result;
+ ++hint;
}
}
diff --git a/boost/serialization/nvp.hpp b/boost/serialization/nvp.hpp
index 6a1eb82656..4e2297b3cc 100644
--- a/boost/serialization/nvp.hpp
+++ b/boost/serialization/nvp.hpp
@@ -21,9 +21,6 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#include <boost/mpl/integral_c.hpp>
-#include <boost/mpl/integral_c_tag.hpp>
-
#include <boost/serialization/level.hpp>
#include <boost/serialization/tracking.hpp>
#include <boost/serialization/split_member.hpp>
@@ -39,14 +36,14 @@ struct nvp :
public std::pair<const char *, T *>,
public wrapper_traits<const nvp< T > >
{
+//private:
+ nvp(const nvp & rhs) :
+ std::pair<const char *, T *>(rhs.first, rhs.second)
+ {}
+public:
explicit nvp(const char * name_, T & t) :
- // note: redundant cast works around borland issue
// note: added _ to suppress useless gcc warning
- std::pair<const char *, T *>(name_, (T*)(& t))
- {}
- nvp(const nvp & rhs) :
- // note: redundant cast works around borland issue
- std::pair<const char *, T *>(rhs.first, (T*)rhs.second)
+ std::pair<const char *, T *>(name_, & t)
{}
const char * name() const {
@@ -60,26 +57,18 @@ struct nvp :
return *(this->second);
}
- // True64 compiler complains with a warning about the use of
- // the name "Archive" hiding some higher level usage. I'm sure this
- // is an error but I want to accomodated as it generates a long warning
- // listing and might be related to a lot of test failures.
- // default treatment for name-value pairs. The name is
- // just discarded and only the value is serialized.
- template<class Archivex>
+ template<class Archive>
void save(
- Archivex & ar,
+ Archive & ar,
const unsigned int /* file_version */
) const {
- // CodeWarrior 8.x can't seem to resolve the << op for a rhs of "const T *"
ar.operator<<(const_value());
}
- template<class Archivex>
+ template<class Archive>
void load(
- Archivex & ar,
+ Archive & ar,
const unsigned int /* file_version */
){
- // CodeWarrior 8.x can't seem to resolve the >> op for a rhs of "const T *"
ar.operator>>(value());
}
BOOST_SERIALIZATION_SPLIT_MEMBER()
@@ -115,7 +104,6 @@ struct tracking_level<nvp< T > >
BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value);
};
-
} // seralization
} // boost
diff --git a/boost/serialization/set.hpp b/boost/serialization/set.hpp
index 01289d5e36..6b957d470e 100644
--- a/boost/serialization/set.hpp
+++ b/boost/serialization/set.hpp
@@ -54,7 +54,12 @@ inline void load_set_collection(Archive & ar, Container &s)
detail::stack_construct<Archive, type> t(ar, item_version);
// borland fails silently w/o full namespace
ar >> boost::serialization::make_nvp("item", t.reference());
- typename Container::iterator result = s.insert(hint, t.reference());
+ typename Container::iterator result =
+ #ifdef BOOST_NO_CXX11_HDR_UNORDERED_SET
+ s.insert(hint, t.reference());
+ #else
+ s.emplace_hint(hint, t.reference());
+ #endif
ar.reset_object_address(& (* result), & t.reference());
hint = result;
}
diff --git a/boost/serialization/singleton.hpp b/boost/serialization/singleton.hpp
index db32395ce2..fcb79c3694 100644
--- a/boost/serialization/singleton.hpp
+++ b/boost/serialization/singleton.hpp
@@ -39,6 +39,10 @@
#include <boost/noncopyable.hpp>
#include <boost/serialization/force_include.hpp>
+#include <boost/archive/detail/auto_link_archive.hpp>
+#include <boost/serialization/config.hpp>
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
@@ -81,25 +85,15 @@ class BOOST_SYMBOL_VISIBLE singleton_module :
public boost::noncopyable
{
private:
- static bool & get_lock(){
- static bool lock = false;
- return lock;
- }
+ static bool & get_lock();
public:
-// static const void * get_module_handle(){
-// return static_cast<const void *>(get_module_handle);
-// }
- static void lock(){
- get_lock() = true;
- }
- static void unlock(){
- get_lock() = false;
- }
- static bool is_locked() {
- return get_lock();
- }
+ BOOST_SERIALIZATION_DECL static void lock();
+ BOOST_SERIALIZATION_DECL static void unlock();
+ BOOST_SERIALIZATION_DECL static bool is_locked();
};
+#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
namespace detail {
template<class T>
diff --git a/boost/serialization/static_warning.hpp b/boost/serialization/static_warning.hpp
index 2d49de1c2d..1d9238fc4d 100644
--- a/boost/serialization/static_warning.hpp
+++ b/boost/serialization/static_warning.hpp
@@ -66,6 +66,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/print.hpp>
#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#include <boost/static_assert.hpp>
namespace boost {
diff --git a/boost/serialization/traits.hpp b/boost/serialization/traits.hpp
index d338b1b123..9e114fdd3d 100644
--- a/boost/serialization/traits.hpp
+++ b/boost/serialization/traits.hpp
@@ -28,7 +28,7 @@
#include <boost/static_assert.hpp>
#include <boost/mpl/int.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#include <boost/serialization/level_enum.hpp>
#include <boost/serialization/tracking_enum.hpp>
diff --git a/boost/serialization/unique_ptr.hpp b/boost/serialization/unique_ptr.hpp
index ac615b9d19..8d8703ef4f 100644
--- a/boost/serialization/unique_ptr.hpp
+++ b/boost/serialization/unique_ptr.hpp
@@ -30,7 +30,7 @@ template<class Archive, class T>
inline void save(
Archive & ar,
const std::unique_ptr< T > &t,
- const unsigned int file_version
+ const unsigned int /*file_version*/
){
// only the raw pointer has to be saved
// the ref count is rebuilt automatically on load
@@ -42,7 +42,7 @@ template<class Archive, class T>
inline void load(
Archive & ar,
std::unique_ptr< T > &t,
- const unsigned int file_version
+ const unsigned int /*file_version*/
){
T *tx;
ar >> BOOST_SERIALIZATION_NVP(tx);
diff --git a/boost/serialization/valarray.hpp b/boost/serialization/valarray.hpp
index d24fda5437..efe102f6cf 100644
--- a/boost/serialization/valarray.hpp
+++ b/boost/serialization/valarray.hpp
@@ -40,20 +40,20 @@ namespace serialization {
template<class Archive, class U>
void save( Archive & ar, const STD::valarray<U> &t, const unsigned int /*file_version*/ )
{
- const collection_size_type count(t.size());
- ar << BOOST_SERIALIZATION_NVP(count);
- if (t.size())
- ar << make_array(detail::get_data(t), t.size());
+ const collection_size_type count(t.size());
+ ar << BOOST_SERIALIZATION_NVP(count);
+ if (t.size())
+ ar << make_array(detail::get_data(t), t.size());
}
template<class Archive, class U>
void load( Archive & ar, STD::valarray<U> &t, const unsigned int /*file_version*/ )
{
- collection_size_type count;
- ar >> BOOST_SERIALIZATION_NVP(count);
- t.resize(count);
- if (t.size())
- ar >> make_array(detail::get_data(t), t.size());
+ collection_size_type count;
+ ar >> BOOST_SERIALIZATION_NVP(count);
+ t.resize(count);
+ if (t.size())
+ ar >> make_array(detail::get_data(t), t.size());
}
// split non-intrusive serialization function member into separate
diff --git a/boost/serialization/vector.hpp b/boost/serialization/vector.hpp
index 6e49bff38a..a1737548ef 100644
--- a/boost/serialization/vector.hpp
+++ b/boost/serialization/vector.hpp
@@ -34,7 +34,7 @@
#include <boost/serialization/array.hpp>
#include <boost/serialization/detail/get_data.hpp>
#include <boost/serialization/detail/stack_constructor.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/bool_fwd.hpp>
#include <boost/mpl/if.hpp>
// default is being compatible with version 1.34.1 files, not 1.35 files
@@ -103,7 +103,7 @@ inline void save(
const collection_size_type count(t.size());
ar << BOOST_SERIALIZATION_NVP(count);
if (!t.empty())
- ar << make_array(detail::get_data(t),t.size());
+ ar << boost::serialization::make_array(detail::get_data(t),t.size());
}
template<class Archive, class U, class Allocator>
@@ -121,7 +121,7 @@ inline void load(
ar >> BOOST_SERIALIZATION_NVP(item_version);
}
if (!t.empty())
- ar >> make_array(detail::get_data(t),t.size());
+ ar >> boost::serialization::make_array(detail::get_data(t),t.size());
}
// dispatch to either default or optimized versions
diff --git a/boost/serialization/vector_135.hpp b/boost/serialization/vector_135.hpp
index 2097cf641e..fd1a7393d1 100644
--- a/boost/serialization/vector_135.hpp
+++ b/boost/serialization/vector_135.hpp
@@ -15,7 +15,7 @@
#ifdef BOOST_SERIALIZATION_VECTOR_VERSIONED
#if BOOST_SERIALIZATION_VECTOR_VERSION != 4
-#error Boost.Serialization cannot be compatible with both 1.35 and 1.36-1.40 files
+#error "Boost.Serialization cannot be compatible with both 1.35 and 1.36-1.40 files"
#endif
#else
#define BOOST_SERIALIZATION_VECTOR_VERSIONED(V) (V>4)
diff --git a/boost/serialization/wrapper.hpp b/boost/serialization/wrapper.hpp
index 6a2a730dde..60d7910b17 100644
--- a/boost/serialization/wrapper.hpp
+++ b/boost/serialization/wrapper.hpp
@@ -9,7 +9,7 @@
#include <boost/serialization/traits.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/mpl/bool_fwd.hpp>
namespace boost { namespace serialization {