Re: Doxygen not showing friend operators of C++ base class

Richard Damon <[email protected]>
Newsgroups gmane.text.doxygen.general
Message-ID <[email protected]>
ADL tricks do not really make something a member, it gives it preference 
in the lookup but it does NOT make the function a friend or a member 
function of the derived class. I think that Doxygen is currently right 
to not make it such, or to incorrectly falsely list friends as 
'inherited'. Perhaps in this sort of case, the function should be marked 
with something like the @memberof tag to pull this friend in closer to 
the class. This seems a better solution to me. (Don't know if that works 
in Doxygen, but if not, fixing that seems less likely than having 
Doxygen 'lie' without user action.

On 9/1/17 7:43 AM, Maarten de Jong wrote:
> Dear Richard,
>
> It actually corresponds to the so-called Barton–Nackman trick which is 
> conform the C++ standard.
> It is characterized by an in-class friend function definition 
> appearing in the base class template
> component of the curiously recurring template pattern (CRTP).
> This implies that the friend specifier is essential.
>
> Maarten
>
>
> On 01/09/2017 12:56, Richard Damon wrote:
>> On 9/1/17 2:03 AM, Maarten de Jong wrote:
>>> Dear all,
>>>
>>> In some previous versions of Doxygen (e.g. 1.6.1) , the friend 
>>> operators of the base class
>>> in the attached example were displayed as "Friends" under the 
>>> listing of the derived class
>>> but this is no longer so in the latest version of Doxygen (1.8.13).
>>> For information, the parameter INLINE_INHERITED_MEMB = YES.
>>> Would it be possible to recover this information?
>>> Thanks in advance,
>>>
>>> Maarten
>>>
>> One thing to note, friends are NOT inherited in C++, so the friend of 
>> a base class has no special rights to my private/protected members, 
>> just those of my base class that gave it friendship.
>>
>> The out of class operators (which are sometimes given friend access) 
>> are NOT member functions.
>>
>> Doxygen listing them as 'Inherited Members' would have been a bug.
>>
>
>

-- 
Richard Damon


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.