blob: 02f372d98887ed7b100133238daea6427a197667 [file] [log] [blame]
// PR c++/68530
// { dg-do compile { target c++14 } }
struct thing {
void foo() {}
};
template<typename>
constexpr int count()
{
auto item = thing {};
for(; (item.foo(), false);); // { dg-error "foo" }
return 0;
}
int main()
{
static_assert( count<int>() == 0, "" ); // { dg-error "" }
}