SWIG 1.3.33 reports a parse error for the method in this example class (although the bug was encountered in similar "real-life" code):
int *(*getFunctionPointer() const)()
I had to stare at the original code some time before I figured out what it actually expressed, isn't C++ wonderful (who needs templates to write hard-to-understand code)?
(getFunctionPointer is a method that takes no arguments, doesn't alter the instance of C it's called on and returns a pointer to [a function that takes no parameters and returns a pointer to an int])
PS This code does compile and gcc-xml concurs with my interpretation of getFunctionPointer ;-)
Log in to post a comment.