[C++-sig] variable # args?

David Abrahams dave at boost-consulting.com
Thu Feb 2 15:59:52 CET 2006


Neal Becker <ndbecker2 at gmail.com> writes:

> Hans Meine wrote:
>
>> On Thursday 02 February 2006 00:34, Neal Becker wrote:
>>> David Abrahams wrote:
>>> > Sounds like you're looking for:
>>> >
>>> >   http://www.boost.org/libs/python/doc/v2/raw_function.html
>>>
>>> Excellent.
>>>
>>> Now, can this be used with make_constructor?  e.g.:
>>>     .def("__init__", make_constructor(raw_function (F)))
>>>
>>> Doesn't seem to work:
>>> /usr/include/nb/boost/python/make_constructor.hpp:230:
>>> error: no matching function for call to
>>> 'get_signature(boost::python::api::object&)'
>> 
>> No, that does not work.  (Both functions wrap a C++ function into a
>> callable object, so they can't work together.)
>> 
>> Have a look at my "Raw constructor (i.e. combination of make_constructor
>> and raw_function)" thread (I say "my .. thread" because it was mostly me
>> discussing with myself ;-p) in the archives, where I finally posted a
>> solution.
>> 
>
> Hey thanks!  Just what I needed.  Can we please add this to boost::python?

Patches are welcome.

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




More information about the Cplusplus-sig mailing list