From 40c3f3ec2efc8d20abcab2c0f3b87647d7f7b281 Mon Sep 17 00:00:00 2001 From: Alain Miniussi Date: Tue, 14 Apr 2015 17:10:39 +0200 Subject: [PATCH] Propagated some changes made in serilization related with archive version and pfto removal. --- .../mpi/detail/forward_skeleton_iarchive.hpp | 15 ++++++-------- .../mpi/detail/forward_skeleton_oarchive.hpp | 15 ++++++-------- .../mpi/detail/ignore_skeleton_oarchive.hpp | 16 ++++++--------- .../mpi/detail/mpi_datatype_oarchive.hpp | 9 +++------ include/boost/mpi/packed_iarchive.hpp | 20 +++++++++---------- include/boost/mpi/packed_oarchive.hpp | 16 +++++++-------- 6 files changed, 39 insertions(+), 52 deletions(-) diff --git a/include/boost/mpi/detail/forward_skeleton_iarchive.hpp b/include/boost/mpi/detail/forward_skeleton_iarchive.hpp index 6e11819..3b4ee4a 100644 --- a/include/boost/mpi/detail/forward_skeleton_iarchive.hpp +++ b/include/boost/mpi/detail/forward_skeleton_iarchive.hpp @@ -41,17 +41,14 @@ public: protected: #endif - // intermediate level to support override of operators - // for templates in the absence of partial function - // template ordering - template - void load_override(T & t, BOOST_PFTO int) - { - archive::load(* this->This(), t); - } + template + void load_override(T & t) + { + archive::load(* this->This(), t); + } #define BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(T) \ - void load_override(T & t , int) \ + void load_override(T & t) \ { \ implementation_archive >> t; \ } diff --git a/include/boost/mpi/detail/forward_skeleton_oarchive.hpp b/include/boost/mpi/detail/forward_skeleton_oarchive.hpp index 6aab053..45920ca 100644 --- a/include/boost/mpi/detail/forward_skeleton_oarchive.hpp +++ b/include/boost/mpi/detail/forward_skeleton_oarchive.hpp @@ -41,17 +41,14 @@ public: protected: #endif - // intermediate level to support override of operators - // for templates in the absence of partial function - // template ordering - template - void save_override(T const& t, BOOST_PFTO int) - { - archive::save(* this->This(), t); - } + template + void save_override(T const& t) + { + archive::save(* this->This(), t); + } #define BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(T) \ - void save_override(T const & t , int) \ + void save_override(T const & t) \ { \ implementation_archive << t; \ } diff --git a/include/boost/mpi/detail/ignore_skeleton_oarchive.hpp b/include/boost/mpi/detail/ignore_skeleton_oarchive.hpp index 06a6bd5..ffdd890 100644 --- a/include/boost/mpi/detail/ignore_skeleton_oarchive.hpp +++ b/include/boost/mpi/detail/ignore_skeleton_oarchive.hpp @@ -38,18 +38,14 @@ public: friend class archive::save_access; protected: #endif - - // intermediate level to support override of operators - // for templates in the absence of partial function - // template ordering - template - void save_override(T const& t, BOOST_PFTO int) - { - archive::save(* this->This(), t); - } + template + void save_override(T const& t) + { + archive::save(* this->This(), t); + } #define BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(T) \ - void save_override(T const & , int) \ + void save_override(T const &) \ {} BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_optional_type) diff --git a/include/boost/mpi/detail/mpi_datatype_oarchive.hpp b/include/boost/mpi/detail/mpi_datatype_oarchive.hpp index 7079f21..68f9abb 100644 --- a/include/boost/mpi/detail/mpi_datatype_oarchive.hpp +++ b/include/boost/mpi/detail/mpi_datatype_oarchive.hpp @@ -41,12 +41,9 @@ public: BOOST_MPL_ASSERT((is_mpi_datatype)); *this << x; // serialize the object } - - // intermediate level to support override of operators - // for templates in the absence of partial function - // template ordering + template - void save_override(T const& t, BOOST_PFTO int) + void save_override(T const& t) { save_enum(t,boost::is_enum()); } @@ -54,7 +51,7 @@ public: template void save_enum(T const& t, mpl::false_) { - ignore_skeleton_oarchive::save_override(t, 0); + ignore_skeleton_oarchive::save_override(t); } template diff --git a/include/boost/mpi/packed_iarchive.hpp b/include/boost/mpi/packed_iarchive.hpp index 23d6468..d06e800 100644 --- a/include/boost/mpi/packed_iarchive.hpp +++ b/include/boost/mpi/packed_iarchive.hpp @@ -94,45 +94,45 @@ public: // Load everything else in the usual way, forwarding on to the Base class template - void load_override(T& x, int version, mpl::false_) + void load_override(T& x, mpl::false_) { - archive::detail::common_iarchive::load_override(x,version); + archive::detail::common_iarchive::load_override(x); } // Load it directly using the primnivites template - void load_override(T& x, int /*version*/, mpl::true_) + void load_override(T& x, mpl::true_) { iprimitive::load(x); } // Load all supported datatypes directly template - void load_override(T& x, int version) + void load_override(T& x) { typedef typename mpl::apply1::type >::type use_optimized; - load_override(x, version, use_optimized()); + load_override(x, use_optimized()); } // input archives need to ignore the optional information - void load_override(archive::class_id_optional_type & /*t*/, int){} + void load_override(archive::class_id_optional_type & /*t*/){} - void load_override(archive::class_id_type & t, int version){ + void load_override(archive::class_id_type & t){ int_least16_t x=0; * this->This() >> x; t = boost::archive::class_id_type(x); } - void load_override(archive::version_type & t, int version){ + void load_override(archive::version_type & t){ int_least8_t x=0; * this->This() >> x; t = boost::archive::version_type(x); } - void load_override(archive::class_id_reference_type & t, int version){ - load_override(static_cast(t), version); + void load_override(archive::class_id_reference_type & t){ + load_override(static_cast(t)); } void load_override(archive::class_name_type & t, int) diff --git a/include/boost/mpi/packed_oarchive.hpp b/include/boost/mpi/packed_oarchive.hpp index ab8e3a6..7164503 100644 --- a/include/boost/mpi/packed_oarchive.hpp +++ b/include/boost/mpi/packed_oarchive.hpp @@ -92,41 +92,41 @@ public: // Save everything else in the usual way, forwarding on to the Base class template - void save_override(T const& x, int version, mpl::false_) + void save_override(T const& x, mpl::false_) { - archive::detail::common_oarchive::save_override(x,version); + archive::detail::common_oarchive::save_override(x); } // Save it directly using the primitives template - void save_override(T const& x, int /*version*/, mpl::true_) + void save_override(T const& x, mpl::true_) { oprimitive::save(x); } // Save all supported datatypes directly template - void save_override(T const& x, int version) + void save_override(T const& x) { typedef typename mpl::apply1::type use_optimized; - save_override(x, version, use_optimized()); + save_override(x, use_optimized()); } // input archives need to ignore the optional information void save_override(const archive::class_id_optional_type & /*t*/, int){} // explicitly convert to char * to avoid compile ambiguities - void save_override(const archive::class_name_type & t, int){ + void save_override(const archive::class_name_type & t){ const std::string s(t); * this->This() << s; } - void save_override(const archive::class_id_type & t, int version){ + void save_override(const archive::class_id_type & t){ const boost::int_least16_t x = t; * this->This() << x; } - void save_override(const archive::version_type & t, int version){ + void save_override(const archive::version_type & t){ const boost::int_least8_t x = t; * this->This() << x; }