#35 Bad func ptr args in generated template instantiations

open
nobody
None
5
2011-11-29
2011-11-29
Jason Kankiewicz
No

Py++ generates incorrect code for function pointer arguments in a template class instantiation.
For example, where "serialize" and "marshal" are functions whose signatures match the 2nd and 3rd template arguments of the "Serializable" template class, the generated code should look like this:

bp::class_< Serializable< Thing, serialize, marshal > >( "SerializableThing", bp::init< >() )

Unfortunately, Py++ actually generates code that looks like this:

bp::class_< Serializable< Thing, &(serialize(Thing const&)), &(marshal(std::string const&, Thing&)) > >( "SerializableThing", bp::init< >() )

This bug was encountered with r1856.

Discussion