Skip to content
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

Order of Doxygen entries results in failure using inline namespaces #222

Open
Lunarix opened this issue Feb 4, 2025 · 0 comments
Open

Comments

@Lunarix
Copy link

Lunarix commented Feb 4, 2025

Hello,

I am using doxygen to generate the index.xml and forward it to exhale & breathe generating a sphinx docu.

My code contains inline namespaces, e.g.:

namespace spaceA {
namespace spaceB {
inline namespace v1 {

struct ObjectSize {
    double length = 0; 
};

struct Version {
    uint16_t major = 0;
};

} // namespace v1
} // namespace spaceB
} // namespace spaceA

Now I generate the doxygen index.xml:


 <compound refid="a00355" kind="struct"><name>spaceA::spaceB::ObjectSize</name>
    <member refid="a00355_1a928b11f5716331f0b89abe7d8d4124b4" kind="variable"><name>length</name></member>
  </compound>
  <compound refid="a00355" kind="struct"><name>spaceA::spaceB::v1::ObjectSize</name>
    <member refid="a00355_1a928b11f5716331f0b89abe7d8d4124b4" kind="variable"><name>length</name></member>
  </compound>
 <compound refid="a00359" kind="struct"><name>spaceA::spaceB::v1::Version</name>
    <member refid="a00359_1a600930655b7237315b72223c48327ea8" kind="variable"><name>major</name></member>
  </compound>
  <compound refid="a00359" kind="struct"><name>spaceA::spaceB::Version</name>
    <member refid="a00359_1a600930655b7237315b72223c48327ea8" kind="variable"><name>major</name></member>
  </compound>

As you can see the order of ObjectSize & Version are different. This might be because of the alphabetic ordering of doxygen in the index.xml.

Now using exhale & breathe to generate sphinx docu results in an error. The ObjectSize struct is displayed correct (spaceA::spaceB::v1::ObjectSize), but the Version struct is not found, it searches for spaceA::spaceB::v1::spaceA::spaceB::Version, which is not found.

Image

It seems that the order of entries in the doxygen xml is important, when having inline namespaces in c++.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant