This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/1844: failure to match identical declarations
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/1844: failure to match identical declarations
- From: Jens dot Maurer at gmx dot net
- Date: 2 Feb 2001 23:23:33 -0000
- Reply-To: Jens dot Maurer at gmx dot net
>Number: 1844
>Category: c++
>Synopsis: failure to match identical declarations
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Feb 02 15:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Jens Maurer
>Release: gcc version 2.97 20010202 (experimental)
>Organization:
>Environment:
Linux menuett 2.4.1 #7 Thu Feb 1 20:34:51 CET 2001 i686 unknown
glibc 2.2.1
>Description:
g++ seems to be unable to match up the two function
declarations. It works with gcc 2.95.2.
template-typedef.cc:11: prototype for `B<T>::B(typename T::X<T>)' does not
match any in class `B<T>'
template-typedef.cc:7: candidate is: B<T>::B(typename T::X<T>)
template-typedef.cc:11: template definition of non-template `B<T>::B(typename
T::X<T>)'
>How-To-Repeat:
template<class T>
class B
{
public:
typedef typename T::template X<T> type;
B(type);
};
template<class T>
B<T>::B(type) { }
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: