[C++-sig] boost.python: private copy constructor problem

Roman Yakovenko roman.yakovenko at gmail.com
Tue Dec 2 15:16:36 CET 2008


On Tue, Dec 2, 2008 at 4:11 PM, Renato Araujo <renatox at gmail.com> wrote:
> try use boost::noncopyable to B or implemente a copy constructor in B
> without call A copy contructor.

He is right. The following code was generated by Py++:

#include "boost/python.hpp"

namespace bp = boost::python;

BOOST_PYTHON_MODULE(pyplusplus){
    bp::class_< A, boost::noncopyable >( "A", bp::init< >() );

    bp::class_< B, bp::bases< A >, boost::noncopyable >( "B", bp::init< >() );
}

Py++ has some GUI too (
http://language-binding.net/pyplusplus/documentation/tutorials/pyplusplus_gui.html
) - no need to learn API
-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list