https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91806
Bug ID: 91806
Summary: error: expansion pattern ‘<lambda>()’ contains no
parameter packs
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: unixod at gmail dot com
Target Milestone: ---
Hi,
The following code:
template<typename... T>
void foo()
{
std::vector<std::size_t> {
[]() {
using U = T;
return sizeof(U); // If replace U with T then code compiles.
}()...
};
}
triggers a compilation error:
error: expansion pattern ‘<lambda>()’ contains no parameter packs
The aforementioned example is synthetic, in the real code where I encountered
this problem, the fix had required to move a lambda to a separate function.
The nature of this bug seems very similar to those posted in Bug 86859 and Bug
87001, but I'm unsure.