[Boost-bugs] [Boost C++ Libraries] #6896: Support std::shared_ptr

Subject: [Boost-bugs] [Boost C++ Libraries] #6896: Support std::shared_ptr
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-14 08:14:03

#6896: Support std::shared_ptr
 Reporter: Maciej Dems <maciej.dems@…> | Owner: rwgk
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: Python
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
 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.

 class_< A, boost::shared_ptr<A> >

 it should be possible to use std::shared_ptr for the same purpose:

 class_< A, std::shared_ptr<A> >

 In the present version, the code using std::shared_ptr<A> does not

 However, it seems that it might be sufficient to add the following
 template somewhere in the headers (ifdef-ed for c++0x):

 #include <memory>
 template<class T> inline T * get_pointer(std::shared_ptr<T> const & p) {
     return p.get();

Ticket URL: <https://svn.boost.org/trac/boost/ticket/6896>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC