correction in shared_ptr_helper

permit pass values by const & to output interface
This commit is contained in:
Robert Ramey
2015-04-24 15:12:22 -07:00
parent 83c1373a4d
commit 0100558166
2 changed files with 3 additions and 3 deletions

View File

@@ -66,14 +66,14 @@ public:
}
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

View File

@@ -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