[Bug c++/67370] New: Invalid "parameter packs not expanded" error in lambda capture

ldionne.2 at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Aug 27 11:48:00 GMT 2015


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



More information about the Gcc-bugs mailing list