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++/67370] New: Invalid "parameter packs not expanded" error in lambda capture


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

            Bug ID: 67370
           Summary: Invalid "parameter packs not expanded" error in lambda
                    capture
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldionne.2 at gmail dot com
  Target Milestone: ---

The following code does not compile with GCC trunk:

    template <typename ...T>
    void expand(T const& ...);

    template <typename ...T>
    void f(T ...t) {
        expand([t]{ }...);
    }


The error is

    [snip]: In function 'void f(T ...)':
    [snip]: error: parameter packs not expanded with '...':
         expand([t]{ }...);
                 ^
    [snip]: note:         't'
    [snip]: error: parameter packs not expanded with '...':
         expand([t]{ }...);
                  ^


Live example: http://melpon.org/wandbox/permlink/uKHsTOctM4EbNTpi


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