[pygccxml-development] binding of a default argument calling a function
Brought to you by:
mbaas,
roman_yakovenko
|
From: Benoit L. <ben...@mo...> - 2010-06-28 10:22:45
|
Hello,
In a class, I have the following method:
void addLayer( boost::shared_ptr<Color> color = Color::create(1,1,1) );
This method is exposed by py++ with the following incorrect code:
ClassWrapper_exposer.def(
"addLayer",
addLayer_function_type( &::MyClass::addLayer ),
bp::arg("color")=Color::create(float, float, float)(1.0e+0f, 1.0e+0f) );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note the (float..) part which is incorrect, and only 2 parameters are supplied then
Rright now i have to edit the code generated by py++...or maybe I can try to use the following code:
boost::shared_ptr<Color> defaultColor() { return Color::create(1,1,1); }
void addLayer( boost::shared_ptr<Color> color = defaultColor() );
Is it a known bug in py++?
Thanks!
|