[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 --- Comment #6 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org 2012-07-31 09:46:59 UTC --- Author: paolo Date: Tue Jul 31 09:46:46 2012 New Revision: 190001 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190001 Log: /cp 2012-07-31 Paolo Carlini paolo.carl...@oracle.com PR c++/53624 * pt.c (check_default_tmpl_args): Don't check local types. /testsuite 2012-07-31 Paolo Carlini paolo.carl...@oracle.com PR c++/53624 * g++.dg/cpp0x/temp_default5.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/temp_default5.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com 2012-07-31 09:49:41 UTC --- Fixed.
[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added CC||likan_999.student at sina ||dot com --- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2012-07-28 13:17:35 UTC --- *** Bug 54104 has been marked as a duplicate of this bug. ***
[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2012-07-28 AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot |gnu.org |com Target Milestone|--- |4.8.0 Ever Confirmed|0 |1 --- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com 2012-07-28 13:20:08 UTC --- Looking into it.
[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org 2012-06-10 04:24:44 UTC --- gcc_test2.cpp:5:12: error: no default argument for 'T' It is not rejecting the local type but rather it is rejecting the second template argument which does not have a default argument even though the first argument does.
[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 --- Comment #2 from Daniel Lunow lunow at math dot hu-berlin.de 2012-06-10 04:49:29 UTC --- Their is no requirement (in the c++11 standard) for function templates that implies subsequent template parameters after a template parameter with default template argument must also have default template arguments (in contrast to class templates). In general this works in gcc. But with the local types inside the template function gcc might reject it because it creates local types as templated with the same template parameters/default arguments and checks the requirement for class templates. The line number/offset in the error message clearly refers to the local struct.
[Bug c++/53624] GCC rejects function local types in template function with default template arguments
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53624 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | --- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org 2012-06-10 04:52:21 UTC --- Oh I see. The trunk shows what is going on better: t.cc: In function ‘void Foo(T)’: t.cc:4:12: error: no default argument for ‘T’ struct X {}; ^