[C++-sig] BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS default args core dump

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed May 11 17:44:54 CEST 2011


> I see. I had already successfully tried your proposed solution but was curious if
> I could use the macro mechanism for variable arg lists.


For the record:

If you don't want/need to support keyword arguments, the macro mechanism enables you
to have variable argument lists without having to specify the default values.I don't think there is a way to avoid the default value duplication (once in C++ code,
then again in Boost.Python bindings) if you need keyword arguments.
In practice I find the keyword arguments much more important than the drawback
of having to duplicate the default values, so I never use the macro mechanism.

Ralf


More information about the Cplusplus-sig mailing list