Debian Codegraph @

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

raw
1 // PR c++/114303
2 // { dg-do compile { target c++17 } }
3
4 struct A { static constexpr bool value = true; };
5
6 int main() {
7 [](auto x1) {
8 return [&](auto) {
9 return [&](auto x3) {
10 if constexpr (decltype(x3)::value) {
11 static_assert(decltype(x1)::value);
12 }
13 }(A{});
14 }(0);
15 }(A{});
16 }