From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3967 invoked by alias); 11 May 2006 16:24:30 -0000 Received: (qmail 3784 invoked by alias); 11 May 2006 16:24:07 -0000 Date: Thu, 11 May 2006 16:24:00 -0000 Message-ID: <20060511162407.3783.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/27560] template function not recognized when invoked with enum defined in function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gdr at integrable-solutions dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg01136.txt.bz2 List-Id: ------- 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" writes: | Compiling this file, with mainline, gcc 4.0, or 4.1 | | template 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