[Bug c++/92911] New: Valid lambda inside variadic template does not compile (2)

soko.slav at yandex dot ru gcc-bugzilla@gcc.gnu.org
Wed Dec 11 11:58:00 GMT 2019


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

            Bug ID: 92911
           Summary: Valid lambda inside variadic template does not compile
                    (2)
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: soko.slav at yandex dot ru
  Target Milestone: ---

Code:

template <class ... Ts>
void foo()
{
    (
        []()
        {
            using T = Ts;
        }(),...
    );
}
template void foo<>();


fails to compile with message

In function 'void foo()':
<source>:8:10: error: operand of fold expression has no unexpanded parameter
packs


Tested locally and on https://godbolt.org/z/KpYaup


More information about the Gcc-bugs mailing list