Skip to content

[PARSE BUG]: fails to parse "non-pointer" function argument #111

@sampotter

Description

@sampotter

Problem description

I was very sad to learn that this is valid C++:

void RemoveIf(bool predicate(const T& key));

but apparently it is. 🙃

This library fails to parse it. Changing the line to:

void RemoveIf(bool (*predicate)(const T& key));

fixes the problem, although they are functionally equivalent.

C++ code that can't be parsed correctly (please double-check that https://robotpy.github.io/cxxheaderparser/ has the same error)

void RemoveIf(bool (*predicate)(const T& key));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions