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++/53624] New: GCC rejects function local types in template function with default template arguments


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'


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