Debian Codegraph @

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

raw
1 // PR c++/82022
2 // { dg-do compile { target c++17 } }
3
4 template <class T>
5 void f2()
6 {
7 constexpr bool r = []() constexpr { return false; }();
8 if constexpr (r);
9 if constexpr ([]() constexpr { return false; }());
10 }
11
12 int main()
13 {
14 if constexpr ([]() constexpr { return false; }());
15 f2<int>();
16 }