// { dg-do compile { target c++17 } } // Don't add built-in operator for ++ on bool. template struct S { operator T&(); }; template void foo (S& s) { --s; // { dg-error "no match for" } ++s; // { dg-error "no match for" } s++; // { dg-error "declared for postfix" } s--; // { dg-error "declared for postfix" } } void bar () { S s; foo<0> (s); }