------- 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" <[EMAIL PROTECTED]> 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