CppAst.NET icon indicating copy to clipboard operation
CppAst.NET copied to clipboard

[question] friend function defined within class?

Open harsszegi opened this issue 1 year ago • 2 comments

Hi, does CppAst support friend functions defined within the class itself? E.g. something like this:

class Foo { public: friend bool operator==(const Foo & lhs, const Foo & rhs); };

I fail to see the operator== function anywhere, neither within the class's functions (that's kinda obvious), nor between the functions in the namespace. What do I miss here? Thanks,

harsszegi avatar Oct 25 '23 18:10 harsszegi

I fail to see the operator== function anywhere, neither within the class's functions (that's kinda obvious), nor between the functions in the namespace.

Dunno. CppAst.NET was initially not developed to support C++, so it might miss many stuffs like this. You would have to debug/add support for it in a PR.

xoofx avatar Oct 25 '23 19:10 xoofx

Yes, friend functions is not contain in CppClass now, i try to add it in our local branch, it will be PR to master recently.

fangfang1984 avatar Jan 11 '24 12:01 fangfang1984