diff options
author | kenshi84 <kenshi84@protonmail.ch> | 2016-12-21 14:43:43 +0900 |
---|---|---|
committer | kenshi84 <kenshi84@protonmail.ch> | 2016-12-21 16:05:31 +0900 |
commit | af9a7999257e0c73737f94012148210fc6099436 (patch) | |
tree | 8e0dfc74bd6fa3d87788450d380bb63b1d54ccf1 /external/boost/archive/portable_binary_oarchive.hpp | |
parent | Merge pull request #1479 (diff) | |
download | monero-af9a7999257e0c73737f94012148210fc6099436.tar.xz |
account for API difference between 1.58 & 1.59
Diffstat (limited to 'external/boost/archive/portable_binary_oarchive.hpp')
-rw-r--r-- | external/boost/archive/portable_binary_oarchive.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/external/boost/archive/portable_binary_oarchive.hpp b/external/boost/archive/portable_binary_oarchive.hpp index 19027f65a..8fd7090a1 100644 --- a/external/boost/archive/portable_binary_oarchive.hpp +++ b/external/boost/archive/portable_binary_oarchive.hpp @@ -22,6 +22,7 @@ // See http://www.boost.org for updates, documentation, and revision history.
#include <ostream>
+#include <boost/version.hpp>
#include <boost/serialization/string.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/archive/basic_binary_oprimitive.hpp>
@@ -133,6 +134,7 @@ protected: // extra stuff to get it passed borland compilers
typedef boost::archive::detail::common_oarchive<portable_binary_oarchive>
detail_common_oarchive;
+#if BOOST_VERSION > 105800
template<class T>
void save_override(T & t){
this->detail_common_oarchive::save_override(t);
@@ -146,6 +148,21 @@ protected: void save_override(
const boost::archive::class_id_optional_type & /* t */
){}
+#else
+ template<class T>
+ void save_override(T & t, int){
+ this->detail_common_oarchive::save_override(t, 0);
+ }
+ // explicitly convert to char * to avoid compile ambiguities
+ void save_override(const boost::archive::class_name_type & t, int){
+ const std::string s(t);
+ * this << s;
+ }
+ // binary files don't include the optional information
+ void save_override(
+ const boost::archive::class_id_optional_type & /* t */, int
+ ){}
+#endif
void init(unsigned int flags);
public:
|