c++/1844: failure to match identical declarations
Jens.Maurer@gmx.net
Jens.Maurer@gmx.net
Fri Feb 2 15:26:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list