[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 01:54:32 PDT 2024


cor3ntin wrote:

I might be stupid but i still do not get why fold expressions are special, they should not be.
Can you add tests for 

```cpp
void f(auto...);
template <class = void> void foo() {
 []<class... Is>() {
    f([]() requires (!C<Is>) {}()...);
  }.template operator()<char, int, float>();
}
```

other interesting expansions might be 

```cpp
f<[]() requires (!C<Is>) {}()...>();
//
f({+[]() requires (!C<Is>) {}()});
//
[ ...fs = +[]() requires (!C<Is>) {}()]() {
  (fs(),...);
}
}




https://github.com/llvm/llvm-project/pull/86265


More information about the cfe-commits mailing list