-
-
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
Problems with type aliases inside template #284
Comments
Thank you for such a thorough issue report and for the kind offer to look into a patch. That is very much appreciated. I'll try to look into it and provide some advice on how best to tackle it. Cheers, |
Hi Michael, Just to see if it changed anything, I tried running As you can see the <em class="property">using </em>
<em class="property">using </em>
... The other problem (bigger one, the other I can fix with regex) is that the class name has magically disappeared! Here is how the HTM looks like where the class name should be: <dt id="_CPPv2N5immer6vectorE">
<span id="immer::vector"></span><em class="property">class </em>
</dt> I tried with different themes and similar results. Any clue what is going on? Thanks! |
Ok, I managed to workaround these issues with some # Add the missing class name
src='<span id="\(.*\)"></span><em class="property">class </em>'
dst='<span id=""></span><em class="property">class</em><tt class="descname">\1</tt>'
sed -i "s@$src@$dst@g" $location/_build/html/*.html
# Remove the duplicate `using`
src='<em class="property">using </em><em class="property">using </em>'
dst='<em class="property">using </em>'
sed -i "s@$src@$dst@g" $location/_build/html/*.html
# Remove template parameters in the parent class inside nested `using = ...` declarations
src='<code class="descclassname">\([^&]*\)<\([^&]*\)>::</code>'
dst='<code class="descclassname">\1::</code>'
sed -i "s@$src@$dst@g" $location/_build/html/*.html |
Thanks for the further investigation and updates. I'm not sure quite what is going on. A good step would be to start a branch with an example in the I've made you a collaborator on the project so you should be able to just push a new branch if you have time. |
Thanks Michael! Curiously I was looking at the Sphinx code right now because I wanted to tweak the |
I'm seeing this problem at the moment, with very simple cases - does this have an issue somewhere? |
Could you check if this is still an issue with latest Sphinx (1.7.5) + Breathe (4.9.0)? Afaik there have been many changes since this issue was opened to better support C++ features like this one. |
(With Sphinx 1.7.5 it looks like the visual problems are gone)
is related to why #374 happened. Breathe is sending a fully qualified name to Sphinx and then removes the qualifications from the document trees (see also #356). However, it looks like if you have a templated entity where a nested name is document, then a template argument list is inserted, even though it's not a specialization. For example: template<typename T>
struct A {
int i;
}; Breathe here sends |
Should be fixed with #512, released in Breathe v4.17.0. Note that you also need Sphinx 3.x for recent Breathe versions. |
Hi!
I am trying to use Breathe to document a template class. I am using
breathe
master, since I am aware that other releases have problems (as of #213). The relevant part of the template class looks like this:Nothing crazy I believe, just the typical type aliases when defining a container. However, I am having problems with Breathe. On the command line, it reports stuff like:
And the generated documentation looks like this:
I have these two comments:
using
keyword should only appear once. I guess that theusing >
thingy was not intended to appear and this is a bug.immer::flex_vector<T, B, MemoryPolicy>::
part in front of every type is verbose and redundant. Is there any way to make it not appear? That might be what is causing the problem, but I have not found a way to makedoxygen
not generate it as part of the definition. Maybebreathe
itself could remove it otherwise, what do you think? If you guide me, I can prepare a patch for this.Thanks!
For completeness, here are the relevant lines from the
.xml
file:The text was updated successfully, but these errors were encountered: