mirror of
https://github.com/boostorg/serialization.git
synced 2026-02-23 03:52:24 +00:00
correction in shared_ptr_helper
permit pass values by const & to output interface
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user