Boost C++ Libraries: Ticket #5165: Error in documentaiton "Using smart pointers with Boost.Intrusive containers" https://svn.boost.org/trac10/ticket/5165 <p> The example at <a href="http://www.boost.org/doc/libs/1_35_0/doc/html/interprocess/offset_ptr.html">http://www.boost.org/doc/libs/1_35_0/doc/html/interprocess/offset_ptr.html</a> is erroneous and misleading. </p> <p> First of all, some declarations about namespaces are missing. </p> <p> More importantly, the following line </p> <blockquote> <p> typedef ip::list&lt;shared_memory_data&gt; shm_list_t; </p> </blockquote> <p> defines shm_list_t in such a way that it uses <strong>standard</strong> allocators. This means that the list items are created in normal memory, which is not what the example intends. </p> <p> Even worse, the "Check all the inserted nodes" test fails to detect this problem. </p> <p> The example is problematic anyway, because it only deals with one process. </p> <p> The attachment could serve as a starting point for a good and working example. I suspect you won't like the printf's in it.... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5165 Trac 1.4.3 DeepThought <deeptho@…> Sun, 06 Feb 2011 22:00:05 GMT attachment set https://svn.boost.org/trac10/ticket/5165 https://svn.boost.org/trac10/ticket/5165 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">shm_list.cc</span> </li> </ul> <p> starting point for working example </p> Ticket Steven Watanabe Sun, 13 Mar 2011 18:45:26 GMT owner, component changed https://svn.boost.org/trac10/ticket/5165#comment:1 https://svn.boost.org/trac10/ticket/5165#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Matias Capeletto</span> to <span class="trac-author">Ion Gaztañaga</span> </li> <li><strong>component</strong> <span class="trac-field-old">Documentation</span> → <span class="trac-field-new">interprocess</span> </li> </ul> Ticket Ion Gaztañaga Fri, 01 Apr 2011 17:39:37 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5165#comment:2 https://svn.boost.org/trac10/ticket/5165#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> The intention was not to show a full example, just to point that intrusive accepts custom smart pointers. I've fixed the list definition to be an intrusive list in Boost 1.47 </p> Ticket