This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41973] New: dependent function template instantiation sidetracked by class of the same name
- From: "sstrasser at systemhaus-gruppe dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Nov 2009 18:59:29 -0000
- Subject: [Bug c++/41973] New: dependent function template instantiation sidetracked by class of the same name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
consider the following code:
template<class smgr>
struct a{
class b{
template<class T> void c();
};
class c{ }; // ***
template<class T>
void d(){
b inst;
inst.template c<T>();
};
};
this results in:
12: error: non-template type ?c? used as a template
I believe this is valid code, c refers to the function template b::c, not to
type c.
it compiles ok when you comment the line marked with ***.
comeau C++ compiles it with and without that line.
--
Summary: dependent function template instantiation sidetracked by
class of the same name
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sstrasser at systemhaus-gruppe dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41973