-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Describe the bug
Unable to document default argument on friend functions
/**
* A docs
*/
class A
{
public:
friend void fun(int i);
};
/**
* fun docs
*/
void fun(int i = 0);
Does not show the default argument int i =0
. The standard prohibits default argument in friend function declaration.
§8.3.6 If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit.
It looks like Doxygen uses the friend declaration of the function instead of the definition.
Screenshots
1.8.9.1 - trunk (85eb55d)
The default argument int i = 0
is not documented.
To Reproduce
testcase.zip
Expected behavior
The default argument int i = 0
is documented.