Hello again<br>I just want to say that I managed to solve this problem without creating a temporary , thanks to this thread :<br><a href="http://old.nabble.com/%28de%29serializing-map%3Cconst-A*%3E-to5538474.html#a5596607">http://old.nabble.com/(de)serializing-map%3Cconst-A*%3E-to5538474.html#a5596607</a><br>
<br>And here it is what I have got in my problem :<br>�<br>��� boost::shared_ptr&lt;const TT&gt; jj(new TT(5));<br>�� <br>��� {<br>������� boost::archive::xml_oarchive oa(ofs);<br>������� oa &amp; BOOST_SERIALIZATION_NVP(jj);<br>
��� }<br><br>��� boost::shared_ptr&lt;const TT&gt; rjj;<br><br>��� {<br>������� void* xptr=&amp;rjj;<br>������� boost::shared_ptr&lt;TT&gt; *xxptr;<br>������� xxptr=static_cast&lt; boost::shared_ptr&lt;TT&gt; * &gt; (xptr);<br>
������� boost::archive::xml_iarchive ia(ifs);<br>������� ia &amp; BOOST_SERIALIZATION_NVP(*xxptr); <br>��� }<br>��� <br><br><div class="gmail_quote">On Sun, Dec 20, 2009 at 3:59 PM, Steven Watanabe <span dir="ltr">&lt;<a href="mailto:watanabesj@gmail.com">watanabesj@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">AMDG<div class="im"><br>
<br>
elizabeta petreska wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thank you for the reply.<br>
This works!!! , but it creates a temporary. I was thinking how to cast the<br>
constness away, without making temporary object. I gess know at least I have<br>
one possible solution, althgough not complete happy with it :)<br>
 �<br>
</blockquote>
<br></div>
You can&#39;t avoid the temporary. �Actually, I think the<br>
serialization library should handle this automatically,<br>
since its perfectly safe.<div><div></div><div class="h5"><br>
<br>
In Christ,<br>
Steven Watanabe<br>
<br>
_______________________________________________<br>
Boost-users mailing list<br>
<a href="mailto:Boost-users@lists.boost.org" target="_blank">Boost-users@lists.boost.org</a><br>
<a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br>
</div></div></blockquote></div><br>