Skip to content

Commit

Permalink
correction in shared_ptr_helper
Browse files Browse the repository at this point in the history
permit pass values by const & to output interface
  • Loading branch information
robertramey committed Apr 24, 2015
1 parent 83c1373 commit 0100558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/boost/archive/detail/interface_oarchive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ class interface_oarchive
}

template<class T>
Archive & operator<<(T & t){
Archive & operator<<(const T & t){
this->This()->save_override(t);
return * this->This();
}

// the & operator
template<class T>
Archive & operator&(T & t){
Archive & operator&(const T & t){
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
return * this->This() << const_cast<const T &>(t);
#else
Expand Down
2 changes: 1 addition & 1 deletion include/boost/serialization/shared_ptr_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ template<template<class T> class SPT>
class shared_ptr_helper {
typedef std::map<
const void *, // address of object
SPT<void> // address shared ptr to single instance
SPT<const void> // address shared ptr to single instance
> object_shared_pointer_map;

// list of shared_pointers create accessable by raw pointer. This
Expand Down

0 comments on commit 0100558

Please sign in to comment.