standardese / cppast

Library to parse and work with the C++ AST
Other
1.7k stars 164 forks source link

Checking if a function definition is a of a member function #134

Closed deadlocklogic closed 2 years ago

deadlocklogic commented 2 years ago

As the title says consider:

class A
{
public:
    void a();
};
// Impl
void A::a()
{
}

Is there a way to check if a (Impl) is an outer member function definition? (without creating a manual hierarchy)? @foonathan Any thoughts?

deadlocklogic commented 2 years ago

Ok cpp_forward_declarable::semantic_parent does the job. Thanks!