This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/10141: Member template parsing problem
- From: rodrigo at esss dot com dot br
- To: gcc-gnats at gcc dot gnu dot org
- Date: 18 Mar 2003 20:57:06 -0000
- Subject: c++/10141: Member template parsing problem
- Reply-to: rodrigo at esss dot com dot br
>Number: 10141
>Category: c++
>Synopsis: Member template parsing problem
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Mar 18 21:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Rodrigo Lucianetti
>Release: 3.2.2
>Organization:
>Environment:
linux redhat 8.0,dual AMD athlon MP 1800
>Description:
bug.cpp: In member function `unsigned int Foo2<T1>::Bar(Foo<C1>)':
bug.cpp:18: parse error before `;' token
>How-To-Repeat:
c++ -c -o bug.o bug.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="bug.cpp"
Content-Disposition: inline; filename="bug.cpp"
template<class C>
class Foo {
public:
template<class T>
unsigned Bar()
{
return 0;
}
};
template<class T1>
class Foo2 {
public:
template<class C1>
unsigned Bar( Foo<C1> foo )
{
return foo.NumOf<T1>();
}
};
int main()
{
Foo<int> foo;
foo.Bar<int>();
Foo2<int> foo2;
foo2.Bar( foo );
return 0;
}