https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122389
Bug ID: 122389
Summary: Fold expression of a pack as a default template
argument for a lambda rejected
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Keywords: c++-lambda, rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gulackeg at gmail dot com
Target Milestone: ---
Test code:
// https://godbolt.org/z/z663r51oG
template <int... Is> void f() {
// - Clang/MSVC: OK
// - GCC: error: operand of fold expression has no unexpanded
// parameter packs [-Wtemplate-body]
// - EDG: error: fold expression does not refer to a parameter pack
(..., []<int I = Is> {});
}