// { dg-do compile { target c++20 } } template concept True = true; template concept False = false; template concept Int = __is_same_as(T, int); static_assert(True); static_assert(!False); static_assert(False); // { dg-error "static assertion failed" } constexpr bool will_be_true() { if (True) return true; return false; } constexpr bool will_be_false() { if (!False) return true; return false; } static_assert(will_be_true()); static_assert(will_be_false()); template constexpr bool is_int() { if (Int) return true; return false; } static_assert(is_int()); static_assert(is_int()); // { dg-error "static assertion failed" } template constexpr bool f1() { if (Int) // Note: always true. return true; return false; } static_assert(f1()); static_assert(f1()); template constexpr bool f2() { if constexpr (Int) // Note: always true. return true; return false; } static_assert(f2()); static_assert(f2()); template concept C = true; int driver() { bool c_int = (C); if((C)) ; return c_int; }