1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// PR c++/101764 // { dg-do compile { target c++17 } } void g(...); template<class> auto f() { return [](auto... ts) { g([] { if constexpr (sizeof(ts)); }...); #if __cpp_concepts g(requires { decltype(ts){0}; }...); #endif }; } int main() { f<int>()('a', true); }