ilya-biryukov wrote: I have spent some time poking at the code and looking at the debugger and came up with a smaller repro, see https://gcc.godbolt.org/z/6ccPPd6hz:
```cpp int bar(...); template <int> struct Int {}; template <class ...T> constexpr auto foo(T... x) -> decltype(bar(T(x)...)) { return 1; } template <class ...T> constexpr auto baz(Int<foo<T>(T())>... x) -> int { return 1; } static_assert(baz<Int<1>, Int<2>, Int<3>>(Int<1>(), Int<2>(), Int<3>(), Int<4>()) == 1); ``` I hope this helps. https://github.com/llvm/llvm-project/pull/108197 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits