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

doxygenfunction fails to document operator() overload #525

Open
cmas1 opened this issue May 8, 2020 · 1 comment
Open

doxygenfunction fails to document operator() overload #525

cmas1 opened this issue May 8, 2020 · 1 comment

Comments

@cmas1
Copy link

cmas1 commented May 8, 2020

Hi, I am using breathe 4.18.0 + sphinx 3.0.3 + doxygen 1.8.17 and I am encountering a problem when using the directive doxygenfunction to document the operator() of a class

Here is a dummy example

namespace test{
    
template<typename T>
class MyClass{
public:
    //constructors destructor and other stuff

    /**
     * This is an operator+
     * 
     * \param val input
     * \return something
     */
    T operator+(T val) const noexcept{
        return x+val;
    }

    /**
     * This is an operator()
     * 
     * \param val input
     * \return something
     */
    T operator()(T val) const noexcept{
        return val*x;
    }

private:
        T x;
};

}//namespace test

Now, when I build the documentation from

Test Documentation
==================

Using doxygenclass
~~~~~~~~~~~~~~~~~~
.. doxygenclass:: test::MyClass
    :members:

Using doxygenfunction
~~~~~~~~~~~~~~~~~~~~~
.. doxygenfunction:: test::MyClass::operator+(T val) const noexcept
.. doxygenfunction:: test::MyClass::operator()(T val) const noexcept

I got this result

test_breathe

So the directive doxygenclass manages to document the overload, whereas the directive doxygenfunction fails to find the function. I tried to change the signature of the function in the .rst file, but to no success.

@vermeeren
Copy link
Collaborator

When this issue is handled the thread from #524 (comment) should also be handled, which is about create_function_signature() in directives.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants