Debian Codegraph @

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

raw
1 // PR c++/92654
2 // { dg-do compile { target c++17 } }
3
4 struct A {
5 constexpr operator int () { return 42; }
6 };
7 template <int I> struct C {
8 static const bool ap = I;
9 };
10 template <auto I>
11 void am() {
12 [](auto an)
13 {
14 if constexpr (C<an>::ap) ;
15 }(A{});
16 }
17 void fn() { am<42>(); }