Properties and methods that share the same name in C++ #14259
Unanswered
YakoYakoYokuYoku
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been working in a C++ project in which many classes encapsulate fields with methods, a typical workflow. In said classes the fields come out as properties in the rendered documentation as well as in the Python bindings. The thing is that the Sphinx C++ domain doesn't seem to understand that.
Instead of rendering everything as intended, warnings are emitted and the
colorreference in thecolormethod points to the function itself instead of the member. I expected something like this because this is not supported in the C++ language. Albeit the pattern of having the same name for properties and methods in documentation and bindings isn't a thing I've deliberately made, the Qt framework does this.What I'd want to know is the possibility doing this in Sphinx. I haven't made an issue yet because I'd like to at least learn if there's a workaround. Else I can provide a PR for the matter.
Beta Was this translation helpful? Give feedback.
All reactions