Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/constexpr-if24.C

raw
1 // PR c++/86480
2 // { dg-do compile { target c++17 } }
3
4 template <class...> constexpr bool val = true;
5
6 template <class... T>
7 void f()
8 {
9 [](auto... p)
10 {
11 []{
12 if constexpr (val<T..., decltype(p)...>) { return true; }
13 return false;
14 }();
15 }(42);
16 }
17
18 int main()
19 {
20 f<int>();
21 }