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

Show reference qualification for methods #332

Merged
merged 1 commit into from
May 16, 2018

Conversation

arximboldi
Copy link
Contributor

Since C++11, one may specify if a method can be applied only to l-value or r-value objects. Doxygen sets a refqual="..." attribute on the function node of methods that are explicitly l-value or f-value qualified.

This PR adds support for Sphinx to understand that attribute and properly show the qualification in the generated documentation.

@vermeeren vermeeren self-assigned this May 16, 2018
@vermeeren vermeeren removed the request for review from michaeljones May 16, 2018 15:41
@vermeeren
Copy link
Collaborator

Thanks for the PR. In addition to adding new features and even providing tests for them all this actually also fixes an issue with new sphinx versions. Sorry for the delay.

WARNING: Duplicate declaration. will be emitted without this code, since sphinx will believe the two func() below are the same when they are not at all.

#include <iostream>
/** \brief some struct */
struct some_struct
{
	/** \brief stolen code, lvalue */
	void func() &
	{
		std::cout << "lvalue\n";
	}
	/** \brief stolen code, rvalue */
	void func() &&
	{
		std::cout << "rvalue\n";
	}
};

@vermeeren vermeeren merged commit 554ddb5 into breathe-doc:master May 16, 2018
@arximboldi
Copy link
Contributor Author

Thanks for taking care of cleaning up the open issues and PRs @melvinvermeeren!

@vermeeren vermeeren added enhancement Improvements, additions (also cosmetics) code Source code labels May 21, 2018
vermeeren added a commit that referenced this pull request Jun 4, 2018
Show reference qualification for methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Source code enhancement Improvements, additions (also cosmetics)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants