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++/54104] New: no default argument for 'XXX'


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54104

             Bug #: 54104
           Summary: no default argument for 'XXX'
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: likan_999.student@sina.com


The following piece of code doesn't compile under gcc 4.7.1 with flag
-std=gnu++11:

template <typename T> struct X {};

template <template <typename T> class P = X, typename U>
void f(const U& m) {
    auto g = [] () {};
}


Clang accepts it correctly.

If I remove the line `auto g=...', it compiles successfully.


I am not an expert to standard.  So can anyone take a look, and confirm whether
it is a bug of clang or a bug of gcc?  Thanks.


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