[Bug c++/53624] New: GCC rejects function local types in template function with default template arguments

lunow at math dot hu-berlin.de gcc-bugzilla@gcc.gnu.org
Sun Jun 10 03:38:00 GMT 2012


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'



More information about the Gcc-bugs mailing list