[Bug c++/30624] ignores explicit qualification

pluto at agmk dot net gcc-bugzilla@gcc.gnu.org
Sun Jan 28 19:41:00 GMT 2007



------- Comment #1 from pluto at agmk dot net  2007-01-28 19:41 -------
(In reply to comment #0)
> template<typename T> struct foo { T*    bar(); };
> struct foo1 : public foo<int>, public foo<bool*> { };
> int main() { foo1 f; f.bar<int>(); }

this is an invalid code.
1). f.bar isn't a function template, so f.bar<type> is wrong.
2). f.bar() is ambiguous and compiler reports correct error.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30624



More information about the Gcc-bugs mailing list