This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/27560] template function not recognized when invoked with enum defined in function



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]