[Boost-bugs] [Boost C++ Libraries] #7711: python and unique_ptr

Subject: [Boost-bugs] [Boost C++ Libraries] #7711: python and unique_ptr
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-19 10:31:35


#7711: python and unique_ptr
-----------------------------------------+----------------------------------
 Reporter: maxim.yegorushkin@… | Owner: rwgk
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: Python
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: python,unique_ptr |
-----------------------------------------+----------------------------------
 boost::python supports holding objects by std::auto_ptr<> but not by
 std::unique_ptr<>. Would be great if boost::python were updated to support
 std::unique_ptr<> as well.

 Here is a sample:

 {{{
 #!c++
 #include <boost/python.hpp>
 #include <memory>

 struct Foo {};

 BOOST_PYTHON_MODULE(foo) {
     // This compiles fine.
     boost::python::class_<
           Foo
         , std::auto_ptr<Foo>
         , boost::noncopyable
>("Foo1", boost::python::no_init)
         ;

     // This doesn't compile.
     boost::python::class_<
           Foo
         , std::unique_ptr<Foo>
         , boost::noncopyable
>("Foo2", boost::python::no_init)
         ;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7711>
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:11 UTC