blob: f21a9896ff288f7569c5d1f9f3242989cbf93936 [file] [log] [blame]
// PR c++/80562
// { dg-do compile { target c++17 } }
struct T {
constexpr auto foo() { return false; }
};
template <class MustBeTemplate>
constexpr auto bf(T t) {
if constexpr(t.foo()) { // { dg-error "constant expression" }
return false;
}
return true;
}