Skip to content

Duplicated symbol for function template declared as friend in class template #973

@gennaroprota

Description

@gennaroprota

Given the following code:

template< typename T >
class A
{
    template< typename U >
    friend void f( A< U > const & a );
};

//!     A befriended function template.
//!
//!     \param a An object.
template< typename T >
void
f( A< T > const & a );

MrDocs sees two fs (distinct SymbolIDs). The issue doesn't occur if we replace the function template with a class template. Also, it doesn't occur if A is a non-template class (although, in that case, MrDocs shows U as template parameter name, as if it got the friend declaration, rather than the global one, as "primary").

MrDocs
C++ Documentation Tool
version: 0.0.4
build: ec58dfe
built with LLVM 20.0.0git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions