1 // PR c++/68530 2 // { dg-do compile { target c++14 } } 3 4 struct thing { foothing5 void foo() {} 6 }; 7 8 template<typename> count()9constexpr int count() 10 { 11 auto item = thing {}; 12 for(; (item.foo(), false);); // { dg-error "foo" } 13 return 0; 14 } 15 main()16int main() 17 { 18 static_assert( count<int>() == 0, "" ); // { dg-error "" } 19 } 20