-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
inline constexpr friends inject extra keywords #916
Comments
@cjdb Could you also post the Doxygen XML definition for the |
Not entirely sure what you're after, so I've bundled everything from my |
I noticed while looking into #917 that breathe/breathe/renderer/sphinxrenderer.py Lines 1982 to 1983 in bf020a8
Update: it looks as if |
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
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
Hey everyone, thanks for making a great tool here in Breathe! @vermeeren any chance of getting #918 merged and into a release? It looks like this issue (and #917) have pending fixes that could go in. |
Steps to reproduce
CatCutifier.h
Expected output
Actual output
inline
should not be present at all, andfriend
should only appear once.The text was updated successfully, but these errors were encountered: