mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
31 lines
403 B
C++
31 lines
403 B
C++
#include <boost/python/module.hpp>
|
|
#include <boost/python/class.hpp>
|
|
|
|
struct V
|
|
{
|
|
virtual void f() = 0;
|
|
};
|
|
|
|
struct B
|
|
{
|
|
B(const V&) {}
|
|
};
|
|
|
|
BOOST_PYTHON_MODULE_INIT(bienstman3_ext)
|
|
{
|
|
using namespace boost::python;
|
|
|
|
module m("bienstman3_ext");
|
|
|
|
m
|
|
.add(
|
|
class_<V, boost::noncopyable>("V")
|
|
)
|
|
|
|
.add(
|
|
class_<B>("B")
|
|
.def_init(args<const V&>())
|
|
)
|
|
;
|
|
}
|