[Bug c++/64095] New: [C++14] Ellipsis at end of generic lambda parameter-declaration-clause should be parsed as a parameter pack

ed at catmur dot co.uk gcc-bugzilla@gcc.gnu.org
Thu Nov 27 15:36:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64095

            Bug ID: 64095
           Summary: [C++14] Ellipsis at end of generic lambda
                    parameter-declaration-clause should be parsed as a
                    parameter pack
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ed at catmur dot co.uk

void f() { [](auto...){}(); }

prog.cc: In function 'void f()':
prog.cc:1:26: error: no match for call to '(f()::<lambda(auto:1, ...)>) ()'
void f() { [](auto...){}(); }
                         ^
prog.cc:1:13: note: candidate is:
void f() { [](auto...){}(); }
            ^
prog.cc:1:22: note: template<class auto:1> f()::<lambda(auto:1, ...)>
void f() { [](auto...){}(); }
                     ^
prog.cc:1:22: note:   template argument deduction/substitution failed:
prog.cc:1:26: note:   candidate expects 1 argument, 0 provided
void f() { [](auto...){}(); }
                         ^

According to [dcl.fct]/14 the ellipsis should be parsed as part of the
abstract-declarator; however gcc parses it as part of the
parameter-declaration-clause.

Clang is similarly incorrect; according to
http://www.reddit.com/r/cpp/comments/2nkcvi/generic_lambda_inconsistency/ MSVC
(latest CTP) is correct.



More information about the Gcc-bugs mailing list