[Bug c++/27560] template function not recognized when invoked with enum defined in function
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Thu May 11 16:24:00 GMT 2006
------- Comment #3 from gdr at integrable-solutions dot net 2006-05-11 16:24 -------
Subject: Re: New: template function not recognized when invoked with enum
defined in function
"ian at airs dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| Compiling this file, with mainline, gcc 4.0, or 4.1
|
| template<typename t> void f(t a) { }
| void g() { enum e { v }; f(v); }
|
| gives this error message:
|
| foo.cc: In function ÃÂvoid g()ÃÂ:
| foo.cc:2: error: no matching function for call to ÃÂf(g()::e)ÃÂ
|
| If the enum definition is moved out of the function, this works. With gcc
3.2,
| this works. I didn't try 3.4.
There is a core issue for this. We discussed it again at the last
meeting in Berlin. There are proposals to make it "just work", but
that is still in the open state.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27560
More information about the Gcc-bugs
mailing list