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

Fix bug reported in Issue #441 #445

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,18 @@ def visit_function(self, node):
elif node.refqual == 'rvalue':
signature += '&&'

# Add trailing return type manually:
# https://github.com/michaeljones/breathe/issues/441
if 'auto' in node.definition and '->' in node.argsstring:
index = node.argsstring.find('->')
trailing_return_type = node.argsstring[index:]

# Remove unnecessary default/delete/pure specifier which comes from doxygen's argsstring
if '=' in trailing_return_type:
index = len(trailing_return_type) - (trailing_return_type.find('='))
trailing_return_type = trailing_return_type[:-index]
signature += ' ' + trailing_return_type

# Add `= 0` for pure virtual members.
if node.virt == 'pure-virtual':
signature += '= 0'
Expand Down