Debian Codegraph @

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

raw
1 // PR c++/84421
2 // { dg-do compile { target c++17 } }
3
4 struct A{
5 constexpr operator bool() const { return true; }
6 };
7
8 int main(){
9 auto f = [](auto v){
10 if constexpr(v){}
11 };
12 A a;
13 f(a);
14 }