-
-
Notifications
You must be signed in to change notification settings - Fork 207
fixes "double friend
" issue
#918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
C++ specifiers can go in almost any order, but the `friend` logic was overlooking this for some cases. In particular, `constexpr friend` wasn't being accounted for. The following cases have been verified. ```cpp struct cat { /// Checks if the cats are the same. constexpr friend bool operator==(cat x, cat y) { return true; } /// Makes the cat cute. friend void make_cute(cat c) { } /// Makes the cat cuter. friend void make_cuter(cat c); /// Makes the cat the cutest. constexpr friend void make_cutest(cat c); }; /// This won't be picked up. constexpr void make_cutest(cat c) {} ``` Fixes breathe-doc#916
Is there a way to add unit tests? I haven't worked out how to do that for this project yet :( |
Since I have a vested interest in this getting merged (in that I would love for it to be fixed, and also for the fix for #917 to get merged), I messed around with the testing infrastructure and I wrote what I believe is a sufficient test for this fix. @cjdb, I'm sending it to you as a PR on the |
Hi, I was wondering if this could be reviewed and merged. Are there next steps still needed or is this waiting for a maintainer? |
# In Doxygen up to somewhere between 1.8.17 to exclusive 1.9.1 | ||
# the 'friend' part is also left in the type. | ||
# See also: #767, #916 | ||
typ = re.sub(r"(^|\s+)friend(\s+)", r"\1\2", typ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now require Doxygen 1.9.2+. Is this still relevant?
Happy to merge if conflicts are resolved |
C++ specifiers can go in almost any order, but the
friend
logic was overlooking this for some cases. In particular,constexpr friend
wasn't being accounted for.The following cases have been verified.
Fixes #916