aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/constexpr-if-lambda6.C
blob: 038c2a41210f4a8773d6e6bc10e5f4abd31a045f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/114303
// { dg-do compile { target c++17 } }

struct A { static constexpr bool value = true; };

int main() {
  [](auto x1) {
    return [&](auto) {
      return [&](auto x3) {
        if constexpr (decltype(x3)::value) {
          static_assert(decltype(x1)::value);
        }
      }(A{});
    }(0);
  }(A{});
}