1 // { dg-options -std=c++17 } 2 3 struct A 4 { 5 constexpr operator bool () { return true; } 6 int i; 7 }; 8 9 A a; 10 f()11 template <class T> void f() 12 { 13 constexpr bool b = a; 14 if constexpr (a) { } 15 } 16 main()17 int main() 18 { 19 f<int>(); 20 } 21