Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/constexpr-if-lambda5.C

raw
1 // PR c++/100295
2 // { dg-do compile { target c++17 } }
3
4 template<typename... Ts>
5 void f(Ts... ts) {
6 auto lambda = [=](auto x) {
7 if constexpr (sizeof((ts+x) + ...) != 0)
8 (..., ts);
9 };
10 lambda(0);
11 }
12
13 int main() {
14 f(0, 'a');
15 }