aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorkenshi84 <kenshi84@protonmail.ch>2016-12-16 18:10:03 +0900
committerkenshi84 <kenshi84@protonmail.ch>2016-12-16 23:46:24 +0900
commit66e6af89ce413ed7bb9f427d64250c6cc4bc3120 (patch)
treedd9b808d9ac6cb0e6c46bcf1fbe4bbdfa082bbc2 /src/cryptonote_core
parentMerge pull request #1459 (diff)
downloadmonero-66e6af89ce413ed7bb9f427d64250c6cc4bc3120.tar.xz
added experimental boost::archive::portable_binary_{i|o}archive
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_boost_serialization.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_boost_serialization.h b/src/cryptonote_core/cryptonote_boost_serialization.h
index 663ef5070..9a81ac307 100644
--- a/src/cryptonote_core/cryptonote_boost_serialization.h
+++ b/src/cryptonote_core/cryptonote_boost_serialization.h
@@ -39,6 +39,8 @@
#include <boost/serialization/is_bitwise_serializable.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
+#include <boost/archive/portable_binary_iarchive.hpp>
+#include <boost/archive/portable_binary_oarchive.hpp>
#include "cryptonote_basic.h"
#include "common/unordered_containers_boost_serialization.h"
#include "crypto/crypto.h"
@@ -230,7 +232,8 @@ namespace boost
// a & x.senderPk; // not serialized, as we do not use it in monero currently
}
- inline void serializeOutPk(boost::archive::binary_iarchive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver)
+ template <class Archive>
+ inline typename std::enable_if<Archive::is_loading::value, void>::type serializeOutPk(Archive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver)
{
rct::keyV outPk;
a & outPk;
@@ -242,7 +245,8 @@ namespace boost
}
}
- inline void serializeOutPk(boost::archive::binary_oarchive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver)
+ template <class Archive>
+ inline typename std::enable_if<Archive::is_saving::value, void>::type serializeOutPk(Archive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver)
{
rct::keyV outPk(outPk_.size());
for (size_t n = 0; n < outPk_.size(); ++n)