This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53624] New: GCC rejects function local types in template function with default template arguments
- From: "lunow at math dot hu-berlin.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Jun 2012 03:38:16 +0000
- Subject: [Bug c++/53624] New: GCC rejects function local types in template function with default template arguments
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624
Bug #: 53624
Summary: GCC rejects function local types in template function
with default template arguments
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: lunow@math.hu-berlin.de
Created attachment 27595
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27595
testcase
The error occurs when there is at one template argument with default and one
without. Errors are generated for local structs, classes, unions and lambda
functions.
For the attached usecase I get with gcc 4.6.3 and 4.7.0:
C:\dev\projects\compiler test>g++ gcc_test2.cpp --std=c++0x -fsyntax-only
gcc_test2.cpp: In function 'void Foo(T)':
gcc_test2.cpp:5:12: error: no default argument for 'T'