robotpy / robotpy-cppheaderparser

DEPRECATED: use cxxheaderparser instead
Other
123 stars 39 forks source link

Typedefs nested in classes are not parsed (5.0.14) #68

Closed saschiwy closed 3 years ago

saschiwy commented 3 years ago

Hello!

First, thank you for the amazing library, it really helps to reduce the work I have to do by my own! However, I faced an issue with typedefs.

A type definition inside a class is not parsed, or I could not find the result.

See the example below:

namespace ExampleNamespace
{
    typedef std::function<void(double)> DetectedDefinition;
    class Example
    {
    public:
        typedef std::function<void(double)> UndetecktedDefinition;
    };
}
virtuald commented 3 years ago

It's more likely that it isn't recognizing it due to the function pointers. cppheaderparser is pretty bad at dealing with function pointers. Recommend you try https://github.com/robotpy/cxxheaderparser instead; once I migrate my large project to use it I will be dropping maintenance of this project.