Menu

#47 Transcription error with Boost.Function template parameter

v1.0 (example)
open
nobody
None
5
2013-05-15
2013-05-15
No

The Boost.Python code creator for member functions doesn't correctly transcribe the preferred syntax of a Boost.Function instantiation's template argument because it inserts an extra pair of parentheses between the return type and the arguments in the function signature.

For example, when binding the member function

void A::f(boost::function<W (X x, Y y, Z z)>)

Py++ will output

typedef void ( ::A::*f_function_type )( ::boost::function< W ()(X, Y, Z) > ) ;

instead of

typedef void ( ::A::*f_function_type )( ::boost::function< W (X, Y, Z) > ) ;

and this causes a compilation error with a message like

"function returning function is not allowed".

This bug was encountered with r1856.

Discussion


Log in to post a comment.