[Bug c++/41973] New: dependent function template instantiation sidetracked by class of the same name
sstrasser at systemhaus-gruppe dot de
gcc-bugzilla@gcc.gnu.org
Fri Nov 6 18:59:00 GMT 2009
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
More information about the Gcc-bugs
mailing list