[C++-sig] Raw constructor (i.e. combination of make_constructor and raw_function)

David Abrahams dave at boost-consulting.com
Mon Aug 22 02:47:00 CEST 2005


Hans Meine <hans_meine at gmx.net> writes:

> Hi!
>
> I guess I am not the first one trying to do this, but the closest discussion I 
> could find did not solve this topic:
> http://mail.python.org/pipermail/c++-sig/2005-June/008959.html
>
> I am trying to do something like 
>
>     python::class_<MyVector>("PythonVector", python::no_init)
>         .def("__init__", python::raw_function(&createVector, 1));
>
> But this gives the vector as first element of the args tuple to 
> createVector().  

What's wrong with that?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list