Sohail Somani | 22 May 19:28

Re: [serialization] Handling of references into a std::map

Robert Ramey wrote:
> This can't work.
> 
> load a pointer creates a new pointer with a copy of the original object.
> 
> adding the following to your test should make this clear
> 
> ...
> std::cout << "ref: " << *m.ref << std::endl;
> ...
>  std::cout << "ref: " << *m2.ref << std::endl;
> 

Ok, the author will know more than I! For the OP, you can have a map of 
pointers which will work.

--

-- 
Sohail Somani
http://uint32t.blogspot.com

Gmane