After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 153366 - Fails to recognize class template members with changed parameter names
Fails to recognize class template members with changed parameter names
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2004-09-22 05:16 UTC by Matthias Klose
Modified: 2018-07-30 10:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Klose 2004-09-22 05:16:38 UTC
[forwarded from http://bugs.debian.org/235576]

Doxygen seems lost when you changed the name of a parameter in class
templates.  Consider the following piece of code, where the
declaration of foo and its implementation differ on the name of
parameter: Key, or K:

/**
 ** \file misc/set.hh
 **/

/// Wrapper around std::set.
template < typename Key >
class set
{
  /// Union with another set \a s.
  void foo (const set& s) const;
}; // class set

// Union with another set \a s.
template < class K >
void
set<K>::foo (const set<K>& s) const
{
}

Doxygen reports:

Searching for member function documentation...
/tmp/misc/set/set.hh:17: Warning: no matching class member found for
  template < K >
  void set< K >::foo(const set< K > &s) const
Possible candidates:
  void set< Key >::foo(const set &s) const

If you use the same parameter name it works in both case.  Also, it
seems that the problem is not in recognizing that both are related to
the class set<K>, it seems to be related to the argument of `foo'.
Indeed, if `foo' takes void, or int, as argument, the problem is
solved, independently of the name of the template parameter.

Worse yet: Doxygen accepts happily the following incorrect C++ code,
where I have used `set' without template parameters inside the
implementation of `foo':

--------------------------------------------------
/**
 ** \file misc/set.hh
 **/

/// Wrapper around std::set.
template < typename Key >
class set
{
  /// Union with another set \a s.
  void foo (const set& s) const;
}; // class set

// Union with another set \a s.
template < class K >
void
set<K>::foo (const set& s) const
{
}
--------------------------------------------------

Searching for enumerations...
Searching for member function documentation...
Searching for members imported via using declarations...
Building page list...
Comment 1 Selim Belbachir 2006-08-01 11:29:22 UTC
I confirm the same problem with doxygen 1.4.7.


template <class T_ITEM> 
class AbstractList : public lang::Object
{
public :

    typedef T_ITEM* Iterator;

    void remove(Iterator it);
};

template <class T_ITEM> 
void util::AbstractList<T_ITEM>::remove
   (typename util::AbstractList<T_ITEM>::Iterator  it) 
{
//...
}

result in

AbstractList.h:224: Warning: no matching class member found for
  template < T_ITEM >
  void remove(util::AbstractList< T_ITEM >::T_ITEM *it)
Possible candidates:
  void util::AbstractList< T_ITEM >::remove(Iterator it)
Comment 2 André Klapper 2018-07-30 10:02:21 UTC
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to 

   https://github.com/doxygen/doxygen/issues

All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github.

Hence I am closing this GNOME Bugzilla ticket.
Please use the corresponding ticket in Github instead. Thanks a lot!