--- boost/mpi/detail/packed_iprimitive.hpp 2010-09-29 15:22:58.132714000 +0200 +++ ../boost_1_44_0/boost/mpi/detail/packed_iprimitive.hpp 2010-09-29 15:07:55.983421000 +0200 @@ -34,7 +34,7 @@ packed_iprimitive(buffer_type & b, MPI_Comm const & comm, int position = 0) : buffer_(b), comm(comm), - position(position) + position_(position) { } @@ -53,6 +53,11 @@ return size_ = buffer_.size(); } + int position() const + { + return position_; + } + void resize(std::size_t s) { buffer_.resize(s); @@ -105,13 +110,13 @@ void load_impl(void * p, MPI_Datatype t, int l) { BOOST_MPI_CHECK_RESULT(MPI_Unpack, - (const_cast(boost::serialization::detail::get_data(buffer_)), buffer_.size(), &position, p, l, t, comm)); + (const_cast(boost::serialization::detail::get_data(buffer_)), buffer_.size(), &position_, p, l, t, comm)); } buffer_type & buffer_; mutable std::size_t size_; MPI_Comm comm; - int position; + int position_; }; } } // end namespace boost::mpi --- boost/mpi/detail/binary_buffer_iprimitive.hpp 2010-09-29 15:22:58.122852000 +0200 +++ ../boost_1_44_0/boost/mpi/detail/binary_buffer_iprimitive.hpp 2010-09-29 15:27:49.618019000 +0200 @@ -34,7 +34,7 @@ binary_buffer_iprimitive(buffer_type & b, MPI_Comm const &, int position = 0) : buffer_(b), - position(position) + position_(position) { } @@ -53,6 +53,11 @@ return size_ = buffer_.size(); } + int position() const + { + return position_; + } + void resize(std::size_t s) { buffer_.resize(s); @@ -106,14 +111,14 @@ void load_impl(void * p, int l) { - assert(position+l<=static_cast(buffer_.size())); - std::memcpy(p,&buffer_[position],l); - position += l; + assert(position_+l<=static_cast(buffer_.size())); + std::memcpy(p,&buffer_[position_],l); + position_ += l; } buffer_type & buffer_; mutable std::size_t size_; - int position; + int position_; }; } } // end namespace boost::mpi