summaryrefslogtreecommitdiff
path: root/boost/archive/detail
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-03-21 15:45:20 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-03-21 15:46:37 +0900
commit733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /boost/archive/detail
parent08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff)
downloadboost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz
boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2
boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/archive/detail')
-rw-r--r--boost/archive/detail/basic_archive_impl.hpp3
-rw-r--r--boost/archive/detail/basic_iarchive.hpp8
-rw-r--r--boost/archive/detail/basic_oarchive.hpp8
-rw-r--r--boost/archive/detail/helper_collection.hpp40
-rw-r--r--boost/archive/detail/iserializer.hpp2
-rw-r--r--boost/archive/detail/register_archive.hpp2
6 files changed, 22 insertions, 41 deletions
diff --git a/boost/archive/detail/basic_archive_impl.hpp b/boost/archive/detail/basic_archive_impl.hpp
index b84a509837..860066f89f 100644
--- a/boost/archive/detail/basic_archive_impl.hpp
+++ b/boost/archive/detail/basic_archive_impl.hpp
@@ -16,9 +16,6 @@
// See http://www.boost.org for updates, documentation, and revision history.
-// can't use this - much as I'd like to as borland doesn't support it
-// #include <boost/scoped_ptr.hpp>
-
#include <set>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
diff --git a/boost/archive/detail/basic_iarchive.hpp b/boost/archive/detail/basic_iarchive.hpp
index fdafbbf841..ce8dbc0793 100644
--- a/boost/archive/detail/basic_iarchive.hpp
+++ b/boost/archive/detail/basic_iarchive.hpp
@@ -17,10 +17,10 @@
// See http://www.boost.org for updates, documentation, and revision history.
// can't use this - much as I'd like to as borland doesn't support it
-// #include <boost/scoped_ptr.hpp>
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
#include <boost/serialization/tracking_enum.hpp>
#include <boost/archive/basic_archive.hpp>
@@ -47,9 +47,7 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive :
{
friend class basic_iarchive_impl;
// hide implementation of this class to minimize header conclusion
- // in client code. I couldn't used scoped pointer with borland
- // boost::scoped_ptr<basic_iarchive_impl> pimpl;
- basic_iarchive_impl * pimpl;
+ boost::scoped_ptr<basic_iarchive_impl> pimpl;
virtual void vload(version_type &t) = 0;
virtual void vload(object_id_type &t) = 0;
@@ -59,12 +57,12 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive :
virtual void vload(tracking_type &t) = 0;
protected:
basic_iarchive(unsigned int flags);
+public:
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_iarchive();
-public:
// note: NOT part of the public API.
void next_object_pointer(void *t);
void register_basic_serializer(
diff --git a/boost/archive/detail/basic_oarchive.hpp b/boost/archive/detail/basic_oarchive.hpp
index f65d11036c..fe192f0ab3 100644
--- a/boost/archive/detail/basic_oarchive.hpp
+++ b/boost/archive/detail/basic_oarchive.hpp
@@ -19,9 +19,7 @@
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
-
-// can't use this - much as I'd like to as borland doesn't support it
-// #include <boost/scoped_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/serialization/tracking_enum.hpp>
@@ -48,9 +46,7 @@ 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
- // in client code. note: borland can't use scoped_ptr
- //boost::scoped_ptr<basic_oarchive_impl> pimpl;
- basic_oarchive_impl * pimpl;
+ boost::scoped_ptr<basic_oarchive_impl> pimpl;
// overload these to bracket object attributes. Used to implement
// xml archives
diff --git a/boost/archive/detail/helper_collection.hpp b/boost/archive/detail/helper_collection.hpp
index c01656777d..cfa644f7d4 100644
--- a/boost/archive/detail/helper_collection.hpp
+++ b/boost/archive/detail/helper_collection.hpp
@@ -24,10 +24,8 @@
#include <boost/config.hpp>
-#ifdef BOOST_NO_CXX11_SMART_PTR
- #include <boost/smart_ptr/shared_ptr.hpp>
- #include <boost/smart_ptr/make_shared.hpp>
-#endif
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
namespace boost {
@@ -42,25 +40,17 @@ class helper_collection
// note: we dont' actually "share" the function object pointer
// we only use shared_ptr to make sure that it get's deleted
- #ifndef BOOST_NO_CXX11_SMART_PTR
- typedef std::pair<
- const void *,
- std::shared_ptr<void>
- > helper_value_type;
- template<class T>
- std::shared_ptr<void> make_helper_ptr(){
- return std::make_shared<T>();
- }
- #else
- typedef std::pair<
- const void *,
- boost::shared_ptr<void>
- > helper_value_type;
- template<class T>
- boost::shared_ptr<void> make_helper_ptr(){
- return boost::make_shared<T>();
- }
- #endif
+ typedef std::pair<
+ const void *,
+ boost::shared_ptr<void>
+ > helper_value_type;
+ template<class T>
+ boost::shared_ptr<void> make_helper_ptr(){
+ // use boost::shared_ptr rather than std::shared_ptr to maintain
+ // c++03 compatibility
+ return boost::make_shared<T>();
+ }
+
typedef std::vector<helper_value_type> collection;
collection m_collection;
@@ -69,6 +59,7 @@ class helper_collection
bool operator()(helper_value_type const &rhs) const {
return m_ti == rhs.first;
}
+ predicate & operator=(const void * ti); // to suppress warning
predicate(const void * ti) :
m_ti(ti)
{}
@@ -79,7 +70,6 @@ protected:
public:
template<typename Helper>
Helper& get_helper(void * const id = 0) {
-
collection::const_iterator it =
std::find_if(
m_collection.begin(),
@@ -87,7 +77,7 @@ public:
predicate(id)
);
- void * rval;
+ void * rval = 0;
if(it == m_collection.end()){
m_collection.push_back(
std::make_pair(id, make_helper_ptr<Helper>())
diff --git a/boost/archive/detail/iserializer.hpp b/boost/archive/detail/iserializer.hpp
index 42d00a3350..65dfe8e305 100644
--- a/boost/archive/detail/iserializer.hpp
+++ b/boost/archive/detail/iserializer.hpp
@@ -40,7 +40,7 @@ namespace std{
#include <boost/mpl/greater_equal.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/bool.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/core/no_exceptions_support.hpp>
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
#include <boost/serialization/extended_type_info_typeid.hpp>
diff --git a/boost/archive/detail/register_archive.hpp b/boost/archive/detail/register_archive.hpp
index 81a19b9cf5..5ffecc702c 100644
--- a/boost/archive/detail/register_archive.hpp
+++ b/boost/archive/detail/register_archive.hpp
@@ -28,7 +28,7 @@ struct _ptr_serialization_support
typedef int type;
};
-#ifdef __SUNPRO_CC
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5130)
template<int N>
struct counter : counter<N-1> {};