-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Formatting "template <typename T>" part of C++ declarations #1314
Comments
I'm intending to use sphinx to manually document C++ projects that heavily rely on templates but this is issue doesn't help with the readability factor—too bad it's marked as a low priority. |
Same here! Since doxygen is basically unusable for template heavy C++-code, Sphinx is a nice alternative. But until this is implemented, I will have to use rst sections for my functions. |
I would like to implement it when I find time, but there are 3 separate issues of which I need a bit of help with the last two:
|
A declaration can be split over multiple lines by escaping the line break. For example:
Each line of template parameter lists should be rendered on their own line. |
Hi,
I understand this is a pretty subjective request, but I would like to be able to specify a C++ function with template parameters like:
And have it render as:
Currently it will render as two separate functions in the final output or if you put it on one line then it comes out as one line:
In other documentation tools (eg. doxygen) and generally in C++ code layout the
template< typename T>
part goes on the line above. I would also be happy to specify it on one line and have Sphinx automatically insert the line break.If this seems like a reasonable thing to support then I would be happy to try to look into implementing it. My interest is in part driven by my work on the Breathe Sphinx extension which generally deals with C++ and would benefit from this multi-line support in the rendering of desc_signature node.
I realise the impact of this change my be considered to be breaking/changing current behaviour and so cannot be done.
Cheers,
Michael
The text was updated successfully, but these errors were encountered: