Boost C++ Libraries: Ticket #6896: Support std::shared_ptr https://svn.boost.org/trac10/ticket/6896 <p> In C++0x standard, there is a ne0w std::shared_ptr class, which is very similar to boost::shared_ptr. As in Boost Python one can require to use boost::shared_ptr to store the object, i.e. </p> <p> class_&lt; A, boost::shared_ptr&lt;A&gt; &gt; </p> <p> it should be possible to use std::shared_ptr for the same purpose: </p> <p> class_&lt; A, std::shared_ptr&lt;A&gt; &gt; </p> <p> In the present version, the code using std::shared_ptr&lt;A&gt; does not compile. </p> <p> However, it seems that it might be sufficient to add the following template somewhere in the headers (ifdef-ed for c++0x): </p> <p> #include &lt;memory&gt; template&lt;class T&gt; inline T * get_pointer(std::shared_ptr&lt;T&gt; const &amp; p) { </p> <blockquote> <p> return p.get(); </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6896 Trac 1.4.3 Ralf W. Grosse-Kunstleve Mon, 14 May 2012 13:55:36 GMT <link>https://svn.boost.org/trac10/ticket/6896#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6896#comment:1</guid> <description> <p> please post this feature request to c++sig. hopefully someone will pick it up. </p> </description> <category>Ticket</category> </item> <item> <author>Jan Niklas Hasse <jhasse@…></author> <pubDate>Mon, 16 Jul 2012 07:25:41 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/6896#comment:2 https://svn.boost.org/trac10/ticket/6896#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">jhasse@…</span> added </li> </ul> Ticket Jim Bosch Sat, 22 Dec 2012 18:46:55 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6896#comment:3 https://svn.boost.org/trac10/ticket/6896#comment:3 <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">duplicate</span> </li> </ul> <p> This is a duplicate of <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/6545" title="#6545: Bugs: boost:::python doesn't recognize std::shared_ptr (assigned)">#6545</a>. </p> Ticket