// PR c++/115425 // { dg-do compile { target c++20 } } using size_t = decltype(sizeof(0)); template struct X {}; template void foo(X); template struct S; template auto test() { constexpr static auto x = foo>(); // { dg-error "no matching function" } return [](X) { (typename S::type{}, ...); }(X<__integer_pack (0)...>{}); } int main() { test(); }