-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
"WARNING: Duplicate declaration" for enum class members #470
Comments
My best guess is that this is actually a problem related to #356. Sphinx should handle scoped enums, but I'm not sure what Breathe sends to it. If you make an archive available with a small'ish reproducible example I can try to check. |
Thanks @jakobandersen for the quick answer. I've created a repository reproducing the issue: https://github.com/nicoddemus/sphinx-breath-dup-issue Unfortunately it doesn't seem like <memberdef kind="enum" id="foo_8hpp_1ad62e57bc2f353e6d34f90be57ccd7e68" prot="public" static="no" strong="yes">
<name>Enum1</name>
<enumvalue id="foo_8hpp_1ad62e57bc2f353e6d34f90be57ccd7e68a02129bb861061d1a052c592e2dc6b383" prot="public">
<name>X</name>
</enumvalue>
<enumvalue id="foo_8hpp_1ad62e57bc2f353e6d34f90be57ccd7e68ab1a326c06d88bf042f73d70f50197905" prot="public">
<name>END</name>
</enumvalue>
<location file="foo.hpp" line="3" column="17" bodyfile="foo.hpp" bodystart="3" bodyend="6"/>
</memberdef> (Unless |
Should be fixed with #512, released in Breathe v4.17.0. Note that you also need Sphinx 3.x for recent Breathe versions. |
Hi!
First of all thanks for the project, makes writing C++ documentation a breeze!
I'm getting these warning messages when building my project:
Here are the relevant enums:
As can be seen, there are multiple
END
declarations, but I'm usingenum classes
, which makes the members semantically different and type-safe, so they are not really duplicate.My question is: should
breathe
understand that those areenum classes
and do not generate duplicate declarations?If not, does anybody know a way to ignore the warnings? I ask because I like to turn warnings into errors in
sphinx-build
to catch errors, and having this false-positive warnings prevents me from doing that.The text was updated successfully, but these errors were encountered: