| 1 |
// PR c++/80562 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
|
| 4 |
struct T { |
| 5 |
int i; |
| 6 |
constexpr auto foo() { return false; } |
| 7 |
}; |
| 8 |
|
| 9 |
template <class MustBeTemplate> |
| 10 |
constexpr auto bf(T t) { |
| 11 |
if constexpr(t.foo()) { |
| 12 |
return false; |
| 13 |
} |
| 14 |
return true; |
| 15 |
} |