From bc13577187a6a53b93e3faa4aab63d7168ffc8f8 Mon Sep 17 00:00:00 2001 From: Alain Miniussi Date: Fri, 17 Apr 2015 14:23:07 +0200 Subject: [PATCH] Fixed const bug in save_override. A few const were missing in save_override variants. As a result the most generl function was selected instead of the most specific versions. Only trigger in BOOST_MPI_HOMOGENEOUS mode. --- include/boost/mpi/packed_oarchive.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/mpi/packed_oarchive.hpp b/include/boost/mpi/packed_oarchive.hpp index 887aeac..5fa02af 100644 --- a/include/boost/mpi/packed_oarchive.hpp +++ b/include/boost/mpi/packed_oarchive.hpp @@ -113,20 +113,20 @@ public: } // input archives need to ignore the optional information - void save_override(const archive::class_id_optional_type & /*t*/, int){} + void save_override(archive::class_id_optional_type const& /*t*/, int){} // explicitly convert to char * to avoid compile ambiguities - void save_override(const archive::class_name_type & t, int){ + void save_override(archive::class_name_type const& t, int){ const std::string s(t); * this->This() << s; } - void save_override(archive::class_id_type & t, int version){ + void save_override(archive::class_id_type const& t, int version){ const boost::int_least16_t x = t; * this->This() << x; } - void save_override(archive::version_type & t, int version){ + void save_override(archive::version_type const& t, int version){ const boost::int_least8_t x = t; * this->This() << x; }